X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts_new.html;h=9252b219778d1dd6715d9f1e9b77bf3da773f427;hb=0e115ecd7e70269ac58ce705adec4b1c801d14de;hp=683841c33a89073fc1204b69d588faaaa8d1051b;hpb=1cde870268b03197da75f089669d60a7ba3c5617;p=freeside.git
diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html
index 683841c33..9252b2197 100644
--- a/httemplate/view/cust_main/contacts_new.html
+++ b/httemplate/view/cust_main/contacts_new.html
@@ -1,22 +1,28 @@
+% if ( $display and @cust_contacts ) {
Contacts
<& /elements/table-grid.html &>
-% my $bgcolor1 = '#eeeeee';
-% my $bgcolor2 = '#ffffff';
-% my $bgcolor = $bgcolor2;
-% my $th = '
';
+
+% my $th = '';
|
<%$th%>Type
<%$th%>Contact
<%$th%>Email
+ <%$th%>Send invoices
+ <%$th%>Send messages
<%$th%>Self-service
% foreach my $phone_type (@phone_type) {
<%$th%><% $phone_type->typename |h %>
% }
<%$th%>Comment
+
+% my $bgcolor1 = '#ffffff';
+% my $bgcolor2 = '#eeeeee';
+% my $bgcolor = $bgcolor2;
+% my $count = 0;
% foreach my $cust_contact ( @cust_contacts ) {
% my $contact = $cust_contact->contact;
% my $td = qq( | );
@@ -27,12 +33,23 @@
% 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
%# disable
%# re-email
+
+ <& /elements/change_password.html,
+ 'contact_num' => $cust_contact->contactnum,
+ 'custnum' => $cust_contact->custnum,
+ 'no_label_display' => '',
+ 'label' => 'change password',
+ 'curr_value' => '',
+ 'pre_pwd_field_label' => 'contact'.$count.'_',
+ &>
+
% } else {
Disabled
%# enable
@@ -57,8 +74,10 @@
% } else {
% $bgcolor = $bgcolor1;
% }
+% $count++;
% }
+%}
<%once>
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
@@ -71,4 +90,8 @@ my( $cust_main ) = @_;
my @cust_contacts = $cust_main->cust_contact;
+# residential customers have a default "invisible" contact, but if they
+# somehow get more than one contact, show them
+my $display = scalar(@cust_contacts) > 0;
+
%init>