X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts_new.html;h=22968b628ebd17588d473d2de7e27962440f31b4;hb=31592a2ac1d8762246cd173beb33606444fe3acc;hp=bd812c7e7f14e4f3bab08612b21c9833dfd371f0;hpb=8e5fab2148c7dc492b9fffe271c3dcf8df55b01f;p=freeside.git
diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html
index bd812c7e7..22968b628 100644
--- a/httemplate/view/cust_main/contacts_new.html
+++ b/httemplate/view/cust_main/contacts_new.html
@@ -1,22 +1,81 @@
-% if ( @contacts ) {
-Contacts
-<% ntable("#cccccc",2) %>
+Contacts
+Edit contacts
+
+<& /elements/table-grid.html &>
+% my $bgcolor1 = '#eeeeee';
+% my $bgcolor2 = '#ffffff';
+% my $bgcolor = $bgcolor2;
+% my $count = 0;
+
+ Type |
+ Contact |
+ Email |
+ Self-service |
+% foreach my $phone_type (@phone_type) {
+ <% $phone_type->typename |h %> phone
+% }
+ |
+
% foreach my $contact ( @contacts ) {
- Contact |
- <% $contact->line %> |
+ <% $contact->contact_classname |h %> |
+ <% $contact->line |h %> |
+
+% my @contact_email = $contact->contact_email;
+ <% join(', ', map $_->emailaddress, @contact_email) %> |
+
+
+% if ( $contact->selfservice_access ) {
+ Enabled
+%# disable
+%# re-email
+
+ <& /elements/change_password.html,
+ 'contact_num' => $contact->contactnum,
+ 'custnum' => $contact->custnum,
+ 'no_label_display' => '',
+ 'label' => 'change password',
+ 'curr_value' => '',
+ 'pre_pwd_field_label' => 'contact'.$count.'_',
+ &>
+
+% } else {
+ Disabled
+%# enable
+% }
+ |
+
+% foreach my $phone_type (@phone_type) {
+% my $contact_phone =
+% qsearchs('contact_phone', {
+% 'contactnum' => $contact->contactnum,
+% 'phonetypenum' => $phone_type->phonetypenum,
+% });
+ <% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %> |
+% }
+
+
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+% $count++;
% }
+<%once>
-% }
+my @phone_type = FS::phone_type->get_phone_types();
+%once>
<%init>
my( $cust_main ) = @_;
#my $conf = new FS::Conf;
my @contacts = $cust_main->cust_contact;
+my $display = scalar(@contacts) > 0;
%init>