Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / edit / cust_main / name.html
1 <%def .namepart>
2 % my ($field, $value, $label, $extra) = @_;
3 <DIV STYLE="display: inline-block" ID="<% $field %>_input">
4   <INPUT TYPE="text" NAME="<% $field %>" VALUE="<% $value |h %>" <%$extra%>>
5   <BR><FONT SIZE="-1" COLOR="#333333"><% mt($label) %></FONT>
6 </DIV>
7 </%def>
8
9 <TR>
10   <TH CLASS="required label" ALIGN="right"><% mt('Contact name') |h %></TD>
11   <TD COLSPAN=6 STYLE="vertical-align:top">
12         <& .namepart, 'last', $cust_main->last, 'Last', ',' &>
13         <& .namepart, 'first', $cust_main->first, 'First' &>
14 % if ( $conf->exists('show_ss') ) {
15         &nbsp;
16         <& .namepart, 'ss', $ss, 'SS#', "SIZE=11" &>
17 % } else  {
18         <INPUT TYPE="hidden" NAME="ss" VALUE="<% $ss %>">
19 % }
20   </TD>
21 </TR>
22 % if ( $conf->exists('cust_main-enable_spouse') ) {
23 <TR ID="spouse_row">
24   <TH CLASS="label" ALIGN="right"><DIV ID="spouse_label"><% mt('Spouse\'s name') |h %></DIV></TD>
25   <TD COLSPAN=6>
26         <& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &>
27         <& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &>
28   </TD>
29 </TR>
30 % }
31
32 % if ( $conf->exists('cust-email-high-visibility') ) {
33 <TR>
34   <TH ALIGN="right" CLASS="
35     <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
36         ? 'required label'
37         : 'label' %>">Email address(es)
38   </TD>
39   <TD BGCOLOR="#FFFF00">
40     <INPUT TYPE="text" NAME="invoicing_list" 
41            VALUE="<% $cust_main->invoicing_list_emailonly_scalar %>">
42   </TD>
43 </TR>
44 % }
45 <%init>
46 my $cust_main = shift;
47 my $agentnum = $cust_main->agentnum if $cust_main->custnum;
48 my $conf = FS::Conf->new;
49 my $ss;
50
51 if ( $cgi->param('error') or $conf->exists('unmask_ss') ) {
52   $ss = $cust_main->ss;
53 } else {
54   $ss = $cust_main->masked('ss');
55 }
56 </%init>