2 <FONT CLASS="fsinnerbox-title">Contacts</FONT>
3 <A HREF="<%$p%>edit/cust_main-contacts.html?<% $cust_main->custnum %>">Edit contacts</A>
5 <& /elements/table-grid.html &>
6 % my $bgcolor1 = '#eeeeee';
7 % my $bgcolor2 = '#ffffff';
8 % my $bgcolor = $bgcolor2;
11 <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Type</TH>
12 <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Contact</TH>
13 <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Email</TH>
14 <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Self-service</TH>
15 % foreach my $phone_type (@phone_type) {
16 <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"><% $phone_type->typename |h %> phone</TD>
20 % foreach my $contact ( @contacts ) {
22 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $contact->contact_classname |h %></TD>
23 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $contact->line |h %></TD>
25 % my @contact_email = $contact->contact_email;
26 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% join(', ', map $_->emailaddress, @contact_email) %></TD>
28 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
29 % if ( $contact->selfservice_access ) {
31 %# <FONT SIZE="-1"><A HREF="XXX">disable</A>
32 %# <A HREF="XXX">re-email</A></FONT>
34 <& /elements/change_password.html,
35 'contact_num' => $contact->contactnum,
36 'custnum' => $contact->custnum,
37 'no_label_display' => '',
38 'label' => 'change password',
40 'pre_pwd_field_label' => 'contact'.$count.'_',
45 %# <FONT SIZE="-1"><A HREF="XXX">enable</A></FONT>
49 % foreach my $phone_type (@phone_type) {
51 % qsearchs('contact_phone', {
52 % 'contactnum' => $contact->contactnum,
53 % 'phonetypenum' => $phone_type->phonetypenum,
55 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD>
60 % if ( $bgcolor eq $bgcolor1 ) {
61 % $bgcolor = $bgcolor2;
63 % $bgcolor = $bgcolor1;
70 my @phone_type = FS::phone_type->get_phone_types();
75 my( $cust_main ) = @_;
76 #my $conf = new FS::Conf;
78 my @contacts = $cust_main->cust_contact;
79 my $display = scalar(@contacts) > 0;