diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-02-03 07:14:45 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-03 07:14:45 -0800 |
| commit | 167dbdad01e2c1b62fd9be43cc05212e8c874a02 (patch) | |
| tree | 0d49c9ba03d64560f21b02a20d32d6005a790ced /httemplate/view | |
| parent | 475ae93877f1d834941f7b9adcc35ee84c5c22fa (diff) | |
contacts can be shared among customers / "duplicate contact emails", RT#27943
Diffstat (limited to 'httemplate/view')
| -rw-r--r-- | httemplate/view/cust_main/contacts_new.html | 33 | ||||
| -rw-r--r-- | httemplate/view/prospect_main.html | 5 |
2 files changed, 23 insertions, 15 deletions
diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html index f73483ae1..f0bc0b848 100644 --- a/httemplate/view/cust_main/contacts_new.html +++ b/httemplate/view/cust_main/contacts_new.html @@ -6,26 +6,31 @@ % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = $bgcolor2; +% my $th = '<TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">'; <TR> - <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Type</TH> - <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Contact</TH> - <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Email</TH> - <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">Self-service</TH> + <%$th%>Type</TH> + <%$th%>Contact</TH> + <%$th%>Email</TH> + <%$th%>Self-service</TH> % foreach my $phone_type (@phone_type) { - <TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"><% $phone_type->typename |h %> phone</TD> + <%$th%><% $phone_type->typename |h %></TH> % } + <%$th%>Comment</TH> </TR> -% foreach my $contact ( @contacts ) { +% foreach my $cust_contact ( @cust_contacts ) { +% my $contact = $cust_contact->contact; +% my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">); + <TR> - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $contact->contact_classname |h %></TD> - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $contact->line |h %></TD> + <%$td%><% $cust_contact->contact_classname |h %></TD> + <%$td%><% $contact->line |h %></TD> % my @contact_email = $contact->contact_email; - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% join(', ', map $_->emailaddress, @contact_email) %></TD> + <%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD> - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> -% if ( $contact->selfservice_access ) { + <%$td%> +% if ( $cust_contact->selfservice_access ) { Enabled %# <FONT SIZE="-1"><A HREF="XXX">disable</A> %# <A HREF="XXX">re-email</A></FONT> @@ -41,9 +46,11 @@ % 'contactnum' => $contact->contactnum, % 'phonetypenum' => $phone_type->phonetypenum, % }); - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD> + <%$td%><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD> % } + <%$td%><% $cust_contact->comment |h %></TD> + </TR> % if ( $bgcolor eq $bgcolor1 ) { @@ -63,6 +70,6 @@ my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'}); my( $cust_main ) = @_; #my $conf = new FS::Conf; -my @contacts = $cust_main->cust_contact; +my @cust_contacts = $cust_main->cust_contact; </%init> diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html index 66abffcdd..a1f14a374 100644 --- a/httemplate/view/prospect_main.html +++ b/httemplate/view/prospect_main.html @@ -39,9 +39,10 @@ </TR> % } -% foreach my $contact ( $prospect_main->contact ) { +% foreach my $prospect_contact ( $prospect_main->prospect_contact ) { +% my $contact = $prospect_contact->contact; <TR> - <TD ALIGN="right"><% $contact->contact_classname %> Contact</TD> + <TD ALIGN="right"><% $prospect_contact->contact_classname %> Contact</TD> <TD BGCOLOR="#FFFFFF"><% $contact->line %></TD> </TR> %} |
