diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-05-07 11:18:15 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-05-07 11:18:15 -0700 |
| commit | a7ec3dcd42e7f15b2bce2abfb5dc9ea07c964cd4 (patch) | |
| tree | 7cf92b30280aad14040824f6516396b72d421f10 /httemplate/edit | |
| parent | df42da2496a364dc9d0e6866de280448066413a9 (diff) | |
add spouse_birthdate, RT#17577
Diffstat (limited to 'httemplate/edit')
| -rwxr-xr-x | httemplate/edit/cust_main.cgi | 5 | ||||
| -rw-r--r-- | httemplate/edit/cust_main/birthdate.html | 30 | ||||
| -rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 6 |
3 files changed, 31 insertions, 10 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d2c0cb785..1762b0015 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -26,7 +26,10 @@ <& cust_main/top_misc.html, $cust_main, 'custnum' => $custnum &> %# birthdate -% if ( $conf->exists('cust_main-enable_birthdate') ) { +% if ( $conf->exists('cust_main-enable_birthdate') +% || $conf->exists('cust_main-enable_spouse_birthdate') +% ) +% { <BR> <& cust_main/birthdate.html, $cust_main &> % } diff --git a/httemplate/edit/cust_main/birthdate.html b/httemplate/edit/cust_main/birthdate.html index b4e78e3b9..6d1c221aa 100644 --- a/httemplate/edit/cust_main/birthdate.html +++ b/httemplate/edit/cust_main/birthdate.html @@ -1,16 +1,32 @@ <% ntable("#cccccc", 2) %> - <% include( '/elements/tr-input-date-field.html', - 'birthdate', - $cust_main->birthdate, - 'Date of Birth', - ( $conf->config('date_format') || "%m/%d/%Y" ), - 1 - ) +% 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++, + }) %> +% } +% 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++, + }) + %> +% } </TABLE> <%init> my( $cust_main, %opt ) = @_; my $conf = new FS::Conf; +my $noinit = 0; + </%init> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 994f9b7ca..4b2ad1324 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -89,9 +89,11 @@ if ( $cgi->param('no_credit_limit') ) { $new->tagnum( [ $cgi->param('tagnum') ] ); -my %usedatetime = ( 'birthdate' => 1 ); +my %usedatetime = ( 'birthdate' => 1, + 'spouse_birthdate' => 1, + ); -foreach my $dfield (qw( birthdate signupdate )) { +foreach my $dfield (qw( birthdate spouse_birthdate signupdate )) { if ( $cgi->param($dfield) && $cgi->param($dfield) =~ /^([ 0-9\-\/]{0,10})$/) { |
