From 774a522ebf772f28ccf3b19f531e2424c62fcc0f Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Sat, 27 Jan 2018 21:21:59 -0600 Subject: RT# 73421 Add allow messages flag message_dest to contact_email --- httemplate/edit/process/cust_main-contacts.html | 8 ++++++++ httemplate/elements/contact.html | 6 ++++-- httemplate/view/cust_main/contacts_new.html | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/process/cust_main-contacts.html b/httemplate/edit/process/cust_main-contacts.html index 6e94a290f..6b7f1c2db 100644 --- a/httemplate/edit/process/cust_main-contacts.html +++ b/httemplate/edit/process/cust_main-contacts.html @@ -1,3 +1,11 @@ +<%doc> + + This form works indirectly with the tables contact_email and + contact_phone. The columns are updated against an FS::contact + object. The insert/update methods of FS::contact will make the + necessary inserts/updates to contact_email and contact_phone. + + <% include('elements/process.html', 'table' => 'cust_main', 'error_redirect' => popurl(3). 'edit/cust_main-contacts.html', diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 31b4e49cb..909ff7893 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -46,7 +46,8 @@ % $value = $contact->get('_password') ? '********' : ''; % } elsif ( $field eq 'selfservice_access' % or $field eq 'comment' -% or $field eq 'invoice_dest' ) { +% or $field eq 'invoice_dest' +% or $field eq 'message_dest' ) { % $value = $X_contact->get($field); % } else { % $value = $contact->get($field); @@ -79,7 +80,7 @@ -% } elsif ( $field eq 'invoice_dest' ) { +% } elsif ( $field eq 'invoice_dest' || $field eq 'message_dest' ) { % my $curr_value = $cgi->param($name . '_' . $field); % $curr_value = $value if !defined($curr_value); <& select.html, @@ -173,6 +174,7 @@ tie my %label, 'Tie::IxHash', unless ($opt{'for_prospect'}) { $label{'invoice_dest'} = 'Send invoices'; + $label{'message_dest'} = 'Send messages'; $label{'selfservice_access'} = 'Self-service'; $label{'password'} = 'Password'; } diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html index 2209d30f3..45187b1ad 100644 --- a/httemplate/view/cust_main/contacts_new.html +++ b/httemplate/view/cust_main/contacts_new.html @@ -11,6 +11,7 @@ <%$th%>Email <%$th%>Send invoices <%$th%>Self-service + <%$th%>Send messages % foreach my $phone_type (@phone_type) { <%$th%><% $phone_type->typename |h %> % } @@ -33,6 +34,7 @@ % my @contact_email = $contact->contact_email; <%$td%><% join(', ', map $_->emailaddress, @contact_email) %> <%$td%><% $cust_contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %> + <%$td%><% $cust_contact->message_dest eq 'Y' ? 'Yes' : 'No' %> <%$td%> % if ( $cust_contact->selfservice_access ) { Enabled -- cgit v1.2.1