X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts_new.html;h=22968b628ebd17588d473d2de7e27962440f31b4;hb=31592a2ac1d8762246cd173beb33606444fe3acc;hp=155490fe194a13a9afae5ab9488c70d30de35356;hpb=83f70978574fef3401020cb11cf651d12c139b3b;p=freeside.git diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html index 155490fe1..22968b628 100644 --- a/httemplate/view/cust_main/contacts_new.html +++ b/httemplate/view/cust_main/contacts_new.html @@ -1,42 +1,73 @@
Contacts -Edit contacts - +Edit contacts + +<& /elements/table-grid.html &> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = $bgcolor2; +% my $count = 0; + + + + + +% foreach my $phone_type (@phone_type) { + + % foreach my $contact ( @contacts ) { -% #XXX maybe this should be a table with alternating colors instead - - + + % my @contact_email = $contact->contact_email; -% if (@contact_email) { - - -% } + + + % foreach my $phone_type (@phone_type) { % my $contact_phone = % qsearchs('contact_phone', { % 'contactnum' => $contact->contactnum, % 'phonetypenum' => $phone_type->phonetypenum, -% }) -% or next; - - -% } - -% if ( $contact->comment ) { - - - +% }); + % } + +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } +% $count++; % }
TypeContactEmailSelf-service<% $phone_type->typename |h %> phone +% } +
<% $contact->contact_classname %> Contact<% $contact->line %><% $contact->contact_classname |h %><% $contact->line |h %>   Email<% join(', ', map $_->emailaddress, @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 +% } +    <% $phone_type->typename %> phone<% $contact_phone->phonenum |h %>   Comment<% $contact->comment |h %><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %>
<%once> -my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'}); +my @phone_type = FS::phone_type->get_phone_types(); <%init> @@ -45,5 +76,6 @@ my( $cust_main ) = @_; #my $conf = new FS::Conf; my @contacts = $cust_main->cust_contact; +my $display = scalar(@contacts) > 0;