customer bill/ship location refactoring, #940
[freeside.git] / httemplate / edit / cust_main / name.html
1 <%def .namepart>
2 % my ($field, $value, $label, $extra) = @_;
3 <TD>
4   <INPUT TYPE="text" NAME="<% $field %>" VALUE="<% $value |h %>" <%$extra%>>
5   <BR><FONT SIZE=-1><% mt($label) %></FONT>
6 </TD>
7 </%def>
8
9 <TR>
10   <TH VALIGN="top" ALIGN="right"><%$r%><% mt('Contact name') |h %></TH>
11   <TD COLSPAN=6>
12     <TABLE CELLSPACING=0 CELLPADDING=0>
13       <TR>
14         <& .namepart, 'last', $cust_main->last, 'Last' &>
15         <TD VALIGN="top"> , </TD>
16         <& .namepart, 'first', $cust_main->first, 'First' &>
17 % if ( $conf->exists('show_ss') ) {
18         <TD>&nbsp;</TD>
19         <& .namepart, 'ss', $ss, 'SS#', "SIZE=11" &>
20 % } else  {
21         <INPUT TYPE="hidden" NAME="ss" VALUE="<% $ss %>">
22 % }
23       </TR>
24     </TABLE>
25   </TD>
26 </TR>
27
28 % if ( $conf->exists('cust-email-high-visibility') ) {
29 <TR>
30   <TD ALIGN="right">
31     <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
32         ? $r
33         : '' %>Email address(es)
34   </TD>
35   <TD BGCOLOR="#FFFF00">
36     <INPUT TYPE="text" NAME="invoicing_list" 
37            VALUE=<% $cust_main->invoicing_list_emailonly_scalar %>>
38   </TD>
39 </TR>
40 % }
41 <%init>
42 my $cust_main = shift;
43 my $agentnum = $cust_main->agentnum if $cust_main->custnum;
44 my $conf = FS::Conf->new;
45 my $r = '<font color="#ff0000">*</font>&nbsp;';
46 my $ss;
47
48 if ( $cgi->param('error') or $conf->exists('unmask_ss') ) {
49   $ss = $cust_main->ss;
50 } else {
51   $ss = $cust_main->masked('ss');
52 }
53 </%init>