1 % if ( $conf->exists('show_stateid') ) {
3 <TH ALIGN="right"><% $stateid_label %></TH>
5 <INPUT TYPE="text" NAME="stateid" VALUE="<% $stateid %>" SIZE=12 ID="stateid">
6 % if ( $stateid && $FS::CurrentUser::CurrentUser->access_right( 'Unmask customer DL' )) {
7 <& /elements/link-replace_element_text.html, {target_id => 'stateid', replace_text => $cust_main->stateid} &>
10 <TD><& /elements/select-state.html,
11 state => $cust_main->stateid_state,
12 country => $cust_main->country, # how does this work on new customer?
14 disable_countyupdate => 1,
18 <INPUT TYPE="hidden" NAME="stateid" VALUE="<% $stateid %>">
19 <INPUT TYPE="hidden" NAME="stateid_state" VALUE="<% $cust_main->stateid_state %>">
23 my $cust_main = shift;
24 my $conf = FS::Conf->new;
26 if ( $cgi->param('error') ) {
27 $stateid = $cust_main->stateid;
28 } elsif ( $cust_main->custnum ) {
29 $stateid = $cust_main->masked('stateid');
33 $cust_main->set('stateid_state' => $cust_main->state)
34 unless $cust_main->stateid_state;
36 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
37 ? 'Driver’s License'
38 : FS::Msgcat::_gettext('stateid') || 'Driver’s License';
40 my $stateid_state_label =
41 FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
42 ? 'Driver’s License State'
43 : FS::Msgcat::_gettext('stateid') || 'Driver’s License State';