Index: openacs-4/packages/contacts/templates/ae-complaint.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/ae-complaint.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/ae-complaint.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,11 @@ + +@page_title;noquote@ +@context;noquote@ + + \ No newline at end of file Index: openacs-4/packages/contacts/templates/ae-complaint.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/ae-complaint.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/ae-complaint.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,7 @@ +set page_title "[_ contacts.Edit_complaint]" + +set context [list $page_title] + +if { [empty_string_p $return_url] } { + set return_url [get_referrer] +} Index: openacs-4/packages/contacts/templates/changes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/changes.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/changes.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,19 @@ + +@party_id@ + + + + + + + + + + + +
+

#contacts.Preview#

+
+ +
+
\ No newline at end of file Index: openacs-4/packages/contacts/templates/changes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/changes.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/changes.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1 @@ +set master_src [parameter::get -parameter "ContactMaster"] \ No newline at end of file Index: openacs-4/packages/contacts/templates/complaint-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/complaint-ae.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/complaint-ae.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,7 @@ + +@supplier_id@ + + Index: openacs-4/packages/contacts/templates/complaint-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/complaint-ae.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/complaint-ae.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,8 @@ +set master_src [parameter::get -parameter "ContactMaster"] + +if {![empty_string_p $project_id]} { + if {[empty_string_p $customer_id]} { + set customer_id [db_string get_customer_id "select p.customer_id from pm_projectsx p, cr_items i where p.item_id = :project_id and i.live_revision = p.revision_id"] + } + set object_id $project_id +} Index: openacs-4/packages/contacts/templates/complaint.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/complaint.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/complaint.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,4 @@ + +@party_id@ + + Index: openacs-4/packages/contacts/templates/complaint.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/complaint.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/complaint.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,3 @@ +set master_src [parameter::get -parameter "ContactMaster"] + +set supplier_id $party_id Index: openacs-4/packages/contacts/templates/contact-groups.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/contact-groups.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/contact-groups.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,4 @@ + +@party_id@ + + Index: openacs-4/packages/contacts/templates/contact-groups.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/contact-groups.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/contact-groups.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,28 @@ +# Get the master src +set master_src [parameter::get -parameter "ContactMaster"] + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set recipients [list] + +lappend recipients "[contact::name -party_id $party_id]" + +set recipients [join $recipients ", "] + + +set group_options [contact::groups -expand "all" -privilege_required "create"] +set groups_belonging_to [db_list get_party_groups { select group_id from group_distinct_member_map where member_id = :party_id }] + +set groups_to_add [list [list "[_ contacts.--_select_a_group_--]" ""]] +foreach group $group_options { + if { [lsearch "$groups_belonging_to" [lindex $group 1]] >= 0 } { + # the party is part of this group + lappend groups_in [list [lindex $group 0] [lindex $group 1] [lindex $group 2]] + } else { + lappend groups_to_add [list [lindex $group 0] [lindex $group 1]] + } +} + +if { [llength $group_options] == "0" } { + ad_return_error "[_ contacts.lt_Insufficient_Permissi]" "[_ contacts.lt_You_do_not_have_permi]" +} Index: openacs-4/packages/contacts/templates/contact.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/contact.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/contact.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,91 @@ + +@party_id@ +
+
+ + +
+
+ +

#contacts.Visit_Club#

+
+ + + + + + + + + + +
+

+ #contacts.PROJECT#

+ +
+
+ + + + +

#invoices.Billable_Projects#

+ + +
+ +
+

#contacts.Complaints#:

+ +
+ #contacts.Add_complaint_to#: @select_menu;noquote@ + + +
+
+

#contacts.Freelancers#:

+ +
+ +
+
+ +

#contacts.Last_updated# @update_date@

+
+
+
+ + + Index: openacs-4/packages/contacts/templates/contact.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/contact.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/contact.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,99 @@ +set master_src [parameter::get -parameter "ContactMaster"] + +set object_type [contact::type -party_id $party_id] +set user_id [ad_conn user_id] +set package_url [ad_conn package_url] + + +# Code for quickly adding an employee + +if {$object_type == "organization"} { +} else { + set employee_url "" +} + +set live_revision [contact::live_revision -party_id $party_id] +if { [exists_and_not_null live_revision] } { + set update_date [db_string get_update_date { select to_char(publish_date,'Mon FMDD, YYYY at FMHH12:MIam') from cr_revisions where revision_id = :live_revision } -default {}] +} + + +if { [site_node::get_package_url -package_key "tasks"] != "" } { + set tasks_enabled_p 1 +} else { + set tasks_enabled_p 0 +} + +# Get the linked projekt_id to display the subprojects if projects is installed +set pm_package_id "" + +if { [string is false [empty_string_p [info procs "::application_data_link::get_linked"]]] } { + + set project_id [lindex [application_data_link::get_linked -from_object_id $party_id -to_object_type "pm_project"] 0] + set dotlrn_club_id [lindex [application_data_link::get_linked -from_object_id $party_id -to_object_type "dotlrn_club"] 0] + + if {$project_id > 0 && $dotlrn_club_id <1} { + set pm_package_id [acs_object::get_element -object_id $project_id -element package_id] + set pm_base_url [apm_package_url_from_id $pm_package_id] + set project_url [export_vars -base $base_url {{project_item_id $project_id}}] + set projects_enabled_p 1 + } else { + set projects_enabled_p 0 + set project_url "" + } + + if {$dotlrn_club_id > 0} { + set club_url [dotlrn_community::get_community_url $dotlrn_club_id] + set dotlrn_club_enabled_p 1 + set pm_package_id [dotlrn_community::get_package_id_from_package_key -package_key "project-manager" -community_id $dotlrn_club_id] + set pm_base_url [apm_package_url_from_id $pm_package_id] + } else { + set dotlrn_club_enabled_p 0 + } + + set iv_package_id [application_link::get_linked -from_package_id [ad_conn package_id] -to_package_key "invoices"] + if {$iv_package_id > 0 } { + set iv_base_url [apm_package_url_from_id $iv_package_id] + set invoices_enabled_p 1 + } else { + set invoices_enabled_p 0 + } +} else { + set dotlrn_club_enabled_p 0 + set projects_enabled_p 0 + set invoices_enabled_p 0 +} + +# We check if the project-manager package is installed, otherwise the queries break +set pm_installed_p [apm_package_enabled_p "project-manager"] + +if { $object_type == "organization" && $pm_installed_p} { + # We are going to get a list of all members of the group Freelancer + # that have worked in a project for customer_id (party_id in this case). + # So first we get all projects were the party_id is customer + + set project_list [db_list get_projects { }] + + if {![empty_string_p $project_list]} { + # Now we search for all the members of the Freelancer + # group that are assigned to one of this projects. + + # Get the group members list + set group_id [group::get_id -group_name "Freelancer"] + set group_members_list [group::get_members -group_id $group_id] + + # Now we create the select menu to use + set select_menu "" + } else { + set select_menu "" + } +} + + + +ad_return_template Index: openacs-4/packages/contacts/templates/contact.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/contact.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/contact.xql 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,28 @@ + + + + + + select + item_id + from + pm_projectsx + where + customer_id = :party_id + + + + + + select + distinct + pa.party_id as supplier_id + from + pm_project_assignment pa + where + pa.project_id in ([template::util::tcl_to_sql_list $project_list]) + and pa.party_id in ([template::util::tcl_to_sql_list $group_members_list]) + + + + \ No newline at end of file Index: openacs-4/packages/contacts/templates/history.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/history.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/history.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,4 @@ + +@party_id@ + + Index: openacs-4/packages/contacts/templates/history.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/history.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/history.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,2 @@ +set master_src [parameter::get -parameter "ContactMaster"] +ad_return_template Index: openacs-4/packages/contacts/templates/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/index.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,19 @@ +

+ +

+ + + + + + + + + Index: openacs-4/packages/contacts/templates/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/index.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,72 @@ +if { [exists_and_not_null add_person] } { + ad_returnredirect "add/person" + ad_script_abort +} elseif { [exists_and_not_null add_organization] } { + ad_returnredirect "add/organization" + ad_script_abort +} + +set aggregated_p 0 +if {[exists_and_not_null aggregate_attribute_id] } { + set aggregated_p 1 +} + +set extend_p 0 +if { [exists_and_not_null search_id] } { + set extend_p 1 +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] + +set valid_page_sizes [list 25 50 100 500] +if { ![exists_and_not_null page_size] || [lsearch $valid_page_sizes $page_size] < 0 } { + set page_size [parameter::get -boolean -parameter "DefaultPageSize" -default "50"] +} + +set contacts_total_count [contact::search::results_count -search_id $search_id -query $query] + +if { $aggregated_p } { + set contacts_total_count "$contacts_total_count" +} + +if { [exists_and_not_null search_id] } { + contact::search::log -search_id $search_id +} + +set public_searches [lang::util::localize_list_of_lists -list [db_list_of_lists public_searches {}]] +set search_options [concat [list [list [_ contacts.All_Contacts] ""]] $public_searches] +set searchcount 1 +db_foreach my_recent_searches {} { + lappend search_options [list "${searchcount}) ${recent_title}" ${recent_search_id}] + incr searchcount +} + +lang::util::localize_list_of_lists -list $search_options + + + +set form_elements { + {search_id:integer(select),optional {label ""} {options $search_options} {html {onChange "javascript:acs_FormRefresh('search')"}}} + {query:text(text),optional {label ""} {html {size 20 maxlength 255}}} + {save:text(submit) {label {[_ contacts.Search]}} {value "go"}} + {results_count:integer(inform),optional {label "  [_ contacts.Results] $contacts_total_count "}} +} + +if { [parameter::get -boolean -parameter "ForceSearchBeforeAdd" -default "0"] } { + if { [exists_and_not_null query] && $search_id == "" } { + append form_elements { + {add_person:text(submit) {label {[_ contacts.Add_Person]}} {value "1"}} + {add_organization:text(submit) {label {[_ contacts.Add_Organization]}} {value "1"}} + } + } +} + +ad_form -name "search" -method "GET" -export {orderby page_size format} -form $form_elements \ + -on_request { + } -edit_request { + } -on_refresh { + } -on_submit { + } -after_submit { + } + Index: openacs-4/packages/contacts/templates/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/index.xql 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,31 @@ + + + + + + select title, + search_id + from contact_searches + where owner_id = :package_id + and title is not null + and not deleted_p + order by lower(title) + + + + + + select cs.title as recent_title, + cs.search_id as recent_search_id + from contact_searches cs, contact_search_log csl + where csl.user_id = :user_id + and cs.search_id = csl.search_id + and cs.title is not null + and cs.owner_id != :package_id + and not cs.deleted_p + order by last_search desc + limit 10 + + + + Index: openacs-4/packages/contacts/templates/message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/message.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/message.adp 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,56 @@ + + +@title;noquote@ +@context;noquote@ + + + + + + +@party_id;noquote@ + +

@error_message;noquote@

+
+
+comment_add.comment + + + #contacts.This_contact_doesnt# + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/contacts/templates/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/templates/Attic/message.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/templates/message.tcl 12 Oct 2005 15:04:05 -0000 1.1 @@ -0,0 +1,280 @@ +set master_src [parameter::get -parameter "ContactMaster"] + +if { [exists_and_not_null message] && ![exists_and_not_null message_type] } { + set message_type [lindex [split $message "."] 0] + set item_id [lindex [split $message "."] 1] +} + +if { [exists_and_not_null party_id] } { + set party_ids [list] + foreach party_id $party_id { + lappend party_ids $party_id + } +} + +set party_count [llength $party_ids] +set title "[_ contacts.Messages]" +set user_id [ad_conn user_id] +set context [list $title] + +set using_emp_email_p 0 + +set recipients [list] +foreach party_id $party_ids { + set contact_name [contact::name -party_id $party_id] + set contact_url [contact::url -party_id $party_id] + set contact_link "${contact_name}" + set sort_key [string toupper $contact_name] + # Check if the party has a valid e-mail address we can send to + set email_p [contact::message::email_address_exists_p -party_id $party_id] + set letter_p [contact::message::mailing_address_exists_p -party_id $party_id] + lappend recipients [list $contact_name $party_id $contact_link $email_p $letter_p] +} +set sorted_recipients [ams::util::sort_list_of_lists -list $recipients] +set recipients [list] +set invalid_recipients [list] +set party_ids [list] +set invalid_party_ids [list] + +foreach recipient $sorted_recipients { + set party_id [lindex $recipient 1] + set contact_link [lindex $recipient 2] + set email_p [lindex $recipient 3] + set letter_p [lindex $recipient 4] + if { $message_type == "letter" } { + if { $letter_p } { + lappend party_ids $party_id + lappend recipients $contact_link + } else { + lappend invalid_party_ids $party_id + lappend invalid_recipients $contact_link + } + } elseif { $message_type == "email" } { + if { $email_p } { + lappend party_ids $party_id + lappend recipients $contact_link + } else { + # We are going to check if there is an employee relationship + # if there is we are going to check if the employer has an + # email adrres, if it does we are going to use that address + set employer_id [relation::get_object_two -object_id_one $party_id \ + -rel_type "contact_rels_employment"] + + if { ![empty_string_p $employer_id] } { + set emp_addr [contact::email -party_id $employer_id] + if { ![empty_string_p $emp_addr] } { + lappend party_ids $party_id + lappend recipients $contact_link + set using_emp_email_p 1 + } else { + lappend invalid_party_ids $party_id + lappend invalid_recipients $contact_link + } + } else { + lappend invalid_party_ids $party_id + lappend invalid_recipients $contact_link + } + } + } else { + if { $email_p || $letter_p } { + lappend party_ids $party_id + lappend recipients $contact_link + } else { + # We are going to check if there is an employee relationship + # if there is we are going to check if the employer has an + # email adrres, if it does we are going to use that address + set employer_id [relation::get_object_two -object_id_one $party_id \ + -rel_type "contact_rels_employment"] + + if { ![empty_string_p $employer_id] } { + set emp_addr [contact::email -party_id $employer_id] + if { ![empty_string_p $emp_addr] } { + lappend party_ids $party_id + lappend recipients $contact_link + set using_emp_email_p 1 + } else { + lappend invalid_party_ids $party_id + lappend invalid_recipients $contact_link + } + } else { + lappend invalid_party_ids $party_id + lappend invalid_recipients $contact_link + } + } + } +} + +set recipients [join $recipients ", "] +set invalid_recipients [join $invalid_recipients ", "] +if { [llength $invalid_recipients] > 0 } { + switch $message_type { + letter { + set error_message [_ contacts.lt_You_cannot_send_a_letter_to_invalid_recipients] + } + email { + set error_message [_ contacts.lt_You_cannot_send_an_email_to_invalid_recipients] + } + default { + set error_message [_ contacts.lt_You_cannot_send_a_message_to_invalid_recipients] + } + } + if { $party_ids != "" } { + util_user_message -html -message $error_message + } +} + +if {[exists_and_not_null object_id]} { + foreach object $object_id { + if {[fs::folder_p -object_id $object]} { + db_foreach files "select r.revision_id + from cr_revisions r, cr_items i + where r.item_id = i.item_id and i.parent_id = :object" { + lappend file_list $revision_id + } + } else { + lappend file_list $object + } + } +} + +if {[exists_and_not_null file_list]} { + set file_ids [join $file_list ","] +} + +set form_elements { + file_ids:text(hidden) + party_ids:text(hidden) + return_url:text(hidden) + folder_id:text(hidden) + {to_name:text(inform),optional {label "[_ contacts.Recipients]"} {value $recipients}} +} + + +if { ![exists_and_not_null message_type] } { + + set message_type_options [ams::util::localize_and_sort_list_of_lists \ + -list [db_list_of_lists get_message_types { select pretty_name, message_type from contact_message_types }] \ + ] + + set message_options [list] + foreach op $message_type_options { + set message_type [lindex $op 1] + if {$message_type == "letter" || $message_type == "email"} { + lappend message_options [list "-- [_ contacts.New] [lindex $op 0] --" $message_type] + } else { + set ${message_type}_options [list [list [_ contacts.--none--] ""]] + } + + # set email_text and letter_text and others in the future + set "${message_type}_text" [lindex $op 0] + } + + set public_text [_ contacts.Public] + set package_id [ad_conn package_id] + set letter_options "" + set email_options "" + db_foreach get_messages { + select CASE WHEN owner_id = :package_id THEN :public_text ELSE contact__name(owner_id) END as public_display, + title, + to_char(item_id,'FM9999999999999999999999') as item_id, + message_type + from contact_messages + where owner_id in ( select party_id from parties ) + or owner_id = :package_id + order by CASE WHEN owner_id = :package_id THEN '000000000' ELSE upper(contact__name(owner_id)) END, message_type, upper(title) + } { + if {$message_type == "letter" || $message_type == "email"} { + lappend ${message_type}_options [list "$public_display [set ${message_type}_text]:$title" "${message_type}.$item_id"] + } else { + lappend ${message_type}_options [list "$public_display:$title" "$item_id"] + } + } + + set message_options [concat \ + $message_options \ + $letter_options \ + $email_options] + + if {[exists_and_not_null header_options]} { + lappend form_elements [list \ + header_id:text(select) \ + [list label "[_ contacts.Header]"] \ + [list options $header_options] \ + ] + } + + lappend form_elements [list \ + message:text(select) \ + [list label "[_ contacts.Message]"] \ + [list options $message_options] \ + ] + + set message_type "" + set title [_ contacts.create_a_message] + +} else { + set title [_ contacts.create_$message_type] +} + +set context [list $title] + +if { [string is false [exists_and_not_null message]] } { + set signature_list [list [list [_ contacts.--none--] ""]] + set reset_title $title + set reset_signature_id $signature_id + db_foreach signatures "select title, signature_id, default_p + from contact_signatures + where party_id = :user_id + order by default_p, upper(title), upper(signature)" { + lappend signature_list [list $title $signature_id] + if { $default_p == "t" } { + set default_signature_id $signature_id + } + } + set title $reset_title + set signature_id $reset_signature_id + append form_elements { + {signature_id:text(select) + {label "[_ contacts.Signature]"} + {options {$signature_list}} + } + } + +} + +if {[exists_and_not_null footer_options]} { + lappend form_elements [list \ + footer_id:text(select) \ + [list label "[_ contacts.Footer]"] \ + [list options $footer_options] \ + ] +} + +set edit_buttons [list [list "[_ contacts.Next]" create]] + +# the message form will rest party_ids so we need to carry it over +set new_party_ids $party_ids +ad_form -action message \ + -name message \ + -cancel_label "[_ contacts.Cancel]" \ + -cancel_url $return_url \ + -edit_buttons $edit_buttons \ + -form $form_elements \ + -on_request { + if { [exists_and_not_null default_signature_id] } { + set signature_id $default_signature_id + } else { + set signature_id "" + } + } -new_request { + } -edit_request { + } -on_submit { + } +set party_ids $new_party_ids + +if {[exists_and_not_null signature_id]} { + set signature [contact::signature::get -signature_id $signature_id] +} else { + set signature "" +} +