summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-01-27 21:21:59 -0600
committerMitch Jackson <mitch@freeside.biz>2018-01-27 21:21:59 -0600
commite517b3733dd3d19a7af586c9f4b8cf9982a8b3d2 (patch)
tree18f97366e5b325844f69246d16a5763b2284ce38 /httemplate
parentf975ff916152bf85b76e5c7bea48f7fdc8af1cc2 (diff)
RT# 73421 Add allow messages flag message_dest to contact_email
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/process/cust_main-contacts.html8
-rw-r--r--httemplate/elements/contact.html6
-rw-r--r--httemplate/view/cust_main/contacts_new.html2
3 files changed, 14 insertions, 2 deletions
diff --git a/httemplate/edit/process/cust_main-contacts.html b/httemplate/edit/process/cust_main-contacts.html
index 2a7185b5c..5b8319f5a 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.
+
+</%doc>
<% 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 faee7ead4..43e520155 100644
--- a/httemplate/elements/contact.html
+++ b/httemplate/elements/contact.html
@@ -42,7 +42,8 @@
% $value = join(', ', map $_->emailaddress, $contact->contact_email);
% } 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);
@@ -78,7 +79,7 @@
return false
}
</SCRIPT>
-% } 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,
@@ -168,6 +169,7 @@ tie my %label, 'Tie::IxHash',
unless ($opt{'for_prospect'}) {
$label{'invoice_dest'} = 'Send&nbsp;invoices';
+ $label{'message_dest'} = 'Send&nbsp;messages';
$label{'selfservice_access'} = 'Self-service';
}
diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html
index 94488670d..a28b44934 100644
--- a/httemplate/view/cust_main/contacts_new.html
+++ b/httemplate/view/cust_main/contacts_new.html
@@ -11,6 +11,7 @@
<%$th%>Email</TH>
<%$th%>Send invoices</TH>
<%$th%>Self-service</TH>
+ <%$th%>Send messages</TH>
% foreach my $phone_type (@phone_type) {
<%$th%><% $phone_type->typename |h %></TH>
% }
@@ -32,6 +33,7 @@
% my @contact_email = $contact->contact_email;
<%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD>
<%$td%><% $cust_contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %></TD>
+ <%$td%><% $cust_contact->message_dest eq 'Y' ? 'Yes' : 'No' %></TD>
<%$td%>
% if ( $cust_contact->selfservice_access ) {
Enabled