From 7bfd0175b05d52b648e283fca4343aef79e851d7 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 14 Mar 2014 16:59:38 -0700 Subject: add spouse name to customer records, #24919 --- httemplate/edit/cust_main.cgi | 1 - httemplate/edit/cust_main/birthdate.html | 42 ++++++++++++++++---------------- httemplate/edit/cust_main/name.html | 33 +++++++++++++------------ httemplate/edit/cust_main/top_misc.html | 2 ++ 4 files changed, 41 insertions(+), 37 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 629c8081d..ddb61fa64 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -30,7 +30,6 @@ %# birthdate % if ( $conf->config('national_id-country') % || $conf->exists('cust_main-enable_birthdate') -% || $conf->exists('cust_main-enable_spouse_birthdate') % || $conf->exists('cust_main-enable_anniversary_date') % ) % { diff --git a/httemplate/edit/cust_main/birthdate.html b/httemplate/edit/cust_main/birthdate.html index e1adbd3bd..ecf591fb0 100644 --- a/httemplate/edit/cust_main/birthdate.html +++ b/httemplate/edit/cust_main/birthdate.html @@ -34,28 +34,28 @@ % } % if ( $conf->exists('cust_main-enable_birthdate') ) { - <% include( '/elements/tr-input-date-field.html', { - 'name' => 'birthdate', - 'value' => $cust_main->birthdate, - 'label' => 'Date of Birth', - 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ), - 'usedatetime' => 1, - 'noinit' => $noinit++, - }) - %> -% } + <& /elements/tr-input-date-field.html, { + 'name' => 'birthdate', + 'value' => $cust_main->birthdate, + 'label' => 'Date of Birth', + 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ), + 'usedatetime' => 1, + 'noinit' => $noinit++, + } + &> -% if ( $conf->exists('cust_main-enable_spouse_birthdate') ) { - <% include( '/elements/tr-input-date-field.html', { - 'name' => 'spouse_birthdate', - 'value' => $cust_main->spouse_birthdate, - 'label' => 'Spouse Date of Birth', - 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ), - 'usedatetime' => 1, - 'noinit' => $noinit++, - }) - %> -% } +% if ( $conf->exists('cust_main-enable_spouse') ) { + <& /elements/tr-input-date-field.html, { + 'name' => 'spouse_birthdate', + 'value' => $cust_main->spouse_birthdate, + 'label' => 'Spouse Date of Birth', + 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ), + 'usedatetime' => 1, + 'noinit' => $noinit++, + } + &> +% } # if enable_spouse +% } # if enable_birthdate % if ( $conf->exists('cust_main-enable_anniversary_date') ) { <% include( '/elements/tr-input-date-field.html', { diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html index 2641ec930..fbb0a916e 100644 --- a/httemplate/edit/cust_main/name.html +++ b/httemplate/edit/cust_main/name.html @@ -1,36 +1,40 @@ <%def .namepart> % my ($field, $value, $label, $extra) = @_; - +
>
<% mt($label) %> - +
- <%$r%><% mt('Contact name') |h %> - - - - <& .namepart, 'last', $cust_main->last, 'Last' &> - + + +   <& .namepart, 'ss', $ss, 'SS#', "SIZE=11" &> % } else { % } - -
, <% mt('Contact name') |h %> + <& .namepart, 'last', $cust_main->last, 'Last', ',' &> <& .namepart, 'first', $cust_main->first, 'First' &> % if ( $conf->exists('show_ss') ) { -  
+% if ( $conf->exists('cust_main-enable_spouse') ) { + + <% mt('Spouse\'s name') |h %> + + <& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &> + <& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &> + + +% } % if ( $conf->exists('cust-email-high-visibility') ) { - + Email address(es) agentnum if $cust_main->custnum; my $conf = FS::Conf->new; -my $r = '* '; my $ss; if ( $cgi->param('error') or $conf->exists('unmask_ss') ) { diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index e25506f52..f3fde53fa 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -27,11 +27,13 @@ if ( what.checked == (what.value == 'Commercial' ) ) { document.getElementById('company_row').style.display = ''; document.getElementById('contacts_div').style.display = ''; + document.getElementById('spouse_row').style.display = 'none'; } else { if ( document.getElementById('company').value.length == 0 ) { document.getElementById('company_row').style.display = 'none'; } document.getElementById('contacts_div').style.display = 'none'; + document.getElementById('spouse_row').style.display = ''; } } -- cgit v1.2.1