X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fcontact.html;h=c2ebb093c8579411907d05e6199c29646600dfa4;hb=d11723f9d8addadcd2aea0dd39fd4d8778dc68ee;hp=2d37dc89530aa41ad5afc8c2d40c431a2d33be5a;hpb=4e77f6927631e226e13da84082be66867b71330f;p=freeside.git diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index 2d37dc895..c2ebb093c 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -1,112 +1,64 @@ -<% &ntable("#cccccc") %> + - - + % if ( $conf->exists('show_ss') && !$pre ) { - + % } elsif ( !$pre ) { % } - - - - - - +% if ( $conf->exists('cust-email-high-visibility') && !$pre ) { + + + + +% } - - - - +% unless ( $conf->exists('cust-edit-alt-field-order') ) { #standard order -% my $address2_label_style = -% ( $disabled -% || ! $conf->exists('cust_main-require_address2') -% || ( !$pre && !$opt{'same_checked'} ) -% ) -% ? 'visibility:hidden' -% : ''; + <& company &> + <& location &> + <& phones &> + <& fax &> - - - - +% } else { #alternate field order - - - - - - - - - - + <& phones &> + <& location &> + <& fax &> + <& company &> - - - -% if ( !$pre ) { - -% } - - - - - - - - - - - - - - - - - +% } % if ( $conf->exists('show_stateid') && !$pre ) { - + - + % } elsif ( !$pre ) { @@ -115,16 +67,71 @@ % }
<%$r%>Contact name
(last, first)
- > , - > + <%$r%><% mt('Contact name (last, first)') |h %> + <%$style%>> , + <%$style%>> SS#<% mt('SS#') |h %>
Company - > -
+ <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum) + ? $r : '' %>Email address(es) + + +
<%$r%>Address - > -
* Unit # - > -
<%$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 - > -
<% $stateid_label %>> <%$style%>> <% $stateid_state_label %><% include('select-state.html', 'state' => $cust_main->stateid_state, - 'country' => $cust_main->country, - 'prefix' => 'stateid_', - 'onchange' => $onchange, - 'disabled' => $disabled) %><& /elements/select-state.html, + 'state' => $cust_main->stateid_state, + 'country' => $cust_main->country, + 'prefix' => 'stateid_', + 'onchange' => $onchange, + 'disabled' => $disabled, + 'style' => \@style, + &> +
-<%$r%>required fields
+<%$r%><% mt('required fields') |h %>
+ +<%def company> +% my $display = ($cust_main->residential_commercial eq 'Commercial') +% ? '' : 'none'; + + <% mt('Company') |h %> + + <%$style%>> + + + + +<%def location> + <& /elements/location.html, + 'prefix' => $pre, + 'object' => $cust_main, + 'onchange' => $onchange, + 'disabled' => $disabled, + 'style' => \@style, + 'same_checked' => $opt{'same_checked'}, + 'geocode' => $opt{'geocode'}, + 'censustract' => $opt{'censustract'}, + &> + + +<%def phones> + <& /elements/tr-cust_main-phones.html, + 'prefix' => $pre, + 'cust_main' => $cust_main, + 'onchange' => $onchange, + 'disabled' => $disabled, + 'style' => $style, + &> + + +<%def fax> + + <% mt('Fax') |h %> + + <%$style%>> + + + + +<%once> + +my $r = qq!* !; + + +<%shared> + +my( %opt, $cust_main, $pre, $onchange, $disabled, @style, $style ); + <%init> -#my( $cust_main, $pre, $onchange, $disabled, %opt ) = @_; -my %opt = @_; -my $cust_main = $opt{'cust_main'}; -my $pre = $opt{'pre'}; -my $onchange = $opt{'onchange'}; -my $disabled = $opt{'disabled'}; +%opt = @_; +$cust_main = $opt{'cust_main'}; +$pre = $opt{'pre'}; +$onchange = $opt{'onchange'}; +$disabled = $opt{'disabled'}; +@style = ( $opt{'style'} ? @{ $opt{'style'} } : () ); + +$style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; my $conf = new FS::Conf; @@ -146,35 +153,10 @@ $cust_main->set($pre.'state', $statedefault ) $cust_main->set('stateid_state', $cust_main->state ) unless $pre || $cust_main->get('stateid_state'); -#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') =~ /^(daytime)?$/ - ? 'Day Phone' - : FS::Msgcat::_gettext('daytime'); -my $night_label = FS::Msgcat::_gettext('night') =~/^(night)?$/ - ? 'Night Phone' - : FS::Msgcat::_gettext('night') || 'Night Phone'; +$opt{geocode} ||= $cust_main->get('geocode'); + +$opt{censustract} ||= $cust_main->censustract; + my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/ ? 'Driver’s License' : FS::Msgcat::_gettext('stateid') || 'Driver’s License'; @@ -182,6 +164,8 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st ? 'Driver’s License State' : FS::Msgcat::_gettext('stateid_state') || 'Driver’s License State'; -my $r = qq!* !; +my @invoicing_list = $cust_main->invoicing_list; + +my $agentnum = $cust_main->agentnum if $cust_main->custnum;