X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fcontact.html;h=57490b962526568b6f82f911197da2065ba5db22;hb=9b4209f91ad9e3c4cef7deebfb0180f6faf1d0dc;hp=3dd24aae55a185fe4a26ac2f9f97d3b38289e35c;hpb=aa5ded92573a8f848d3652234bcfd4f8e4f0f06d;p=freeside.git diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index 3dd24aae5..57490b962 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -1,4 +1,4 @@ -<% &ntable("#cccccc") %> + @@ -14,14 +14,13 @@ % } - - % if ( $conf->exists('cust-email-high-visibility') && !$pre ) { % } -% unless ( $conf->exists('cust-edit-alt-field-order') ) { - - - - - -<& /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'}, -&> - - - - - - - - - - - - - - - - -% } else { - - - - - - - - - - +% unless ( $conf->exists('cust-edit-alt-field-order') ) { #standard order -<& /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'}, -&> + <& company &> + <& location &> + <& phones &> + <& fax &> - - - - +% } else { #alternate field order - - - - + <& phones &> + <& location &> + <& fax &> + <& company &> % } @@ -137,16 +69,88 @@
<%$r%><% mt('Contact name (last, first)') |h %>
- <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es) + <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum) + ? $r : '' %>Email address(es) @@ -29,86 +28,19 @@
<% mt('Company') |h %> - <%$style%>> -
<% $daytime_label %> - <%$style%>> -
<% $night_label %> - <%$style%>> -
<% mt('Fax') |h %> - <%$style%>> -
<% $daytime_label %> - <%$style%>> -
<% $night_label %> - <%$style%>> -
<% mt('Fax') |h %> - <%$style%>> -
<% mt('Company') |h %> - <%$style%>> -
<%$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> + + <% mt('Phones') %> + + + + + + + + + + +
+ <%$style%>> +
<% $daytime_label %> +
  + <%$style%>> +
<% $night_label %> +
  + <%$style%>> +
<% $mobile_label %> +
+ + + + +<%def fax> + + <% mt('Fax') |h %> + + <%$style%>> + + + + +<%once> + +my $r = qq!* !; + + +<%shared> + +my( %opt, $cust_main, $pre, $onchange, $disabled, @style, $style, + $daytime_label, $night_label, $mobile_label, + ); + + <%init> -my %opt = @_; -my $cust_main = $opt{'cust_main'}; -my $pre = $opt{'pre'}; -my $onchange = $opt{'onchange'}; -my $disabled = $opt{'disabled'}; -my @style = ( $opt{'style'} ? @{ $opt{'style'} } : () ); +%opt = @_; +$cust_main = $opt{'cust_main'}; +$pre = $opt{'pre'}; +$onchange = $opt{'onchange'}; +$disabled = $opt{'disabled'}; +@style = ( $opt{'style'} ? @{ $opt{'style'} } : () ); -my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; +$style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; my $conf = new FS::Conf; @@ -174,12 +178,16 @@ if ( $conf->exists('cust_main-require_censustract') ) { $opt{censustract} ||= $cust_main->censustract; } -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'; +$daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/ + ? 'Day' + : FS::Msgcat::_gettext('daytime'); +$night_label = FS::Msgcat::_gettext('night') =~/^(night)?$/ + ? 'Night' + : FS::Msgcat::_gettext('night') || 'Night'; +$mobile_label = FS::Msgcat::_gettext('mobile') =~/^(mobile)?$/ + ? 'Mobile' + : FS::Msgcat::_gettext('mobile') || 'Mobile'; + my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/ ? 'Driver’s License' : FS::Msgcat::_gettext('stateid') || 'Driver’s License'; @@ -187,8 +195,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; +