X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbirthdate.html;h=ecf591fb01686cab053a3a2b25fe69959e0bef25;hb=7516e3da0f17eeecba27219ef96a8b5f46af2083;hp=b4e78e3b9b10a91be461823ae022975ae5a3f462;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/httemplate/edit/cust_main/birthdate.html b/httemplate/edit/cust_main/birthdate.html index b4e78e3b9..ecf591fb0 100644 --- a/httemplate/edit/cust_main/birthdate.html +++ b/httemplate/edit/cust_main/birthdate.html @@ -1,16 +1,80 @@ <% 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 - ) + +% # maybe put after the contact names? + +% my $id_country = $conf->config('national_id-country'); +% if ( $id_country ) { +% if ( $id_country eq 'MY' ) { +% my($old, $nric) = ( '', ''); +% if ( $cust_main->national_id =~ /^\d{6}\-\d{2}\-\d{4}$/ ) { +% $nric = $cust_main->national_id; +% } else { # elsif ( $cust_main->national_id =~ /^\w\d{9}$/ ) { +% $old = $cust_main->national_id; +% #} else { +% # warn "unknown national_id format"; +%# +% } + + <% include( '/elements/tr-input-text.html', + 'field' => 'national_id1', + 'value' => $nric, + 'label' => 'NRIC', + ) + %> + <% include( '/elements/tr-input-text.html', + 'field' => 'national_id2', + 'value' => $old, + 'label' => 'Old IC/Passport', + ) + %> + +% } else { +% warn "unknown national_id-country $id_country"; +% } +% } + +% if ( $conf->exists('cust_main-enable_birthdate') ) { + <& /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') ) { + <& /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', { + 'name' => 'anniversary_date', + 'value' => $cust_main->anniversary_date, + 'label' => 'Anniversary Date', + 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ), + 'usedatetime' => 1, + 'noinit' => $noinit++, + }) %> +% } + <%init> my( $cust_main, %opt ) = @_; my $conf = new FS::Conf; +my $noinit = 0; +