<% &ntable("#cccccc") %> <%$r%>Contact name
(last, first) > , > % if ( $conf->exists('show_ss') && !$pre ) { SS# % } elsif ( !$pre ) { % } Company > <%$r%>Address >   > <%$r%>City > ><%$r%>County <% include('select-county.html', %select_hash ) %> <%$r%>State <% include('select-state.html', %select_hash ) %> <%$r%>Zip > <%$r%>Country <% include('select-country.html', %select_hash ) %> <% $daytime_label %> > <% $night_label %> > Fax > <%$r%>required fields
<%init> my( $cust_main, $pre, $onchange, $disabled ) = @_; my $conf = new FS::Conf; #false laziness with ship state my $countrydefault = $conf->config('countrydefault') || 'US'; $cust_main->set($pre.'country', $countrydefault ) unless $cust_main->get($pre.'country'); my $statedefault = $conf->config('statedefault') || ($countrydefault eq 'US' ? 'CA' : ''); $cust_main->set($pre.'state', $statedefault ) unless $cust_main->get($pre.'state') || $cust_main->get($pre.'country') ne $countrydefault; #my($county_html, $state_html, $country_html) = # FS::cust_main_county::regionselector( $cust_main->get($pre.'county'), # $cust_main->get($pre.'state'), # $cust_main->get($pre.'country'), # $pre, # $onchange, # $disabled, # ); my %select_hash = ( 'county' => $cust_main->get($pre.'county'), 'state' => $cust_main->get($pre.'state'), 'country' => $cust_main->get($pre.'country'), 'prefix' => $pre, 'onchange' => $onchange, 'disabled' => $disabled, ); my @counties = counties( $cust_main->get($pre.'state'), $cust_main->get($pre.'country'), ); my $county_style = scalar(@counties) > 1 ? '' : 'STYLE="visibility:hidden"'; my $daytime_label = FS::Msgcat::_gettext('daytime') || 'Day Phone'; my $night_label = FS::Msgcat::_gettext('night') || 'Night Phone'; my $r = qq!* !;