X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts_new.html;h=bd213d1dd558c6f8845d3adeefba652690bbb9cf;hb=5b9562f8e03ae6efea0c2eaa90341083744fa529;hp=d55ee3dc3b43ac6e06290f6a2939b7071d4f86e6;hpb=ded0cb9e764cd806a13aaf6ddb8cdfe0f3215999;p=freeside.git
diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html
index d55ee3dc3..bd213d1dd 100644
--- a/httemplate/view/cust_main/contacts_new.html
+++ b/httemplate/view/cust_main/contacts_new.html
@@ -10,6 +10,7 @@
<%$th%>Contact
<%$th%>Email
<%$th%>Send invoices
+ <%$th%>Send messages
<%$th%>Self-service
% foreach my $phone_type (@phone_type) {
<%$th%><% $phone_type->typename |h %>
@@ -21,6 +22,7 @@
% 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(
);
@@ -31,12 +33,23 @@
% my @contact_email = $contact->contact_email;
<%$td%><% join(', ', map $_->emailaddress, @contact_email) %> |
- <%$td%><% $contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %>
+ <%$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
@@ -61,12 +74,13 @@
% } else {
% $bgcolor = $bgcolor1;
% }
+% $count++;
% }
%}
<%once>
-my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
+my @phone_type = FS::phone_type->get_phone_types();
%once>
<%init>
@@ -78,7 +92,6 @@ 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 = (length($cust_main->residential_commercial) > 0)
- or ( scalar(@cust_contacts) > 1 );
+my $display = scalar(@cust_contacts) > 0;
%init>