X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fcontact.html;h=4140ec1ea32d210eccab431bd24adcd29bd41c1b;hb=84fa358b56b89205fff99927080d5c28c01d57ff;hp=99bc558c3a65ab4e3a560275f73539d27342caf1;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git
diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html
index 99bc558c3..4140ec1ea 100644
--- a/httemplate/edit/cust_main/contact.html
+++ b/httemplate/edit/cust_main/contact.html
@@ -1,62 +1,48 @@
-<% &ntable("#cccccc") %>
+
- <%$r%>Contact name (last, first) |
-
+ | <%$r%><% mt('Contact name (last, first)') |h %> |
+
<%$style%>> ,
<%$style%>>
|
% if ( $conf->exists('show_ss') && !$pre ) {
- SS# |
+ <% mt('SS#') |h %> |
|
% } elsif ( !$pre ) {
|
% }
-
-
-
- Company |
-
- <%$style%>>
- |
-
+% if ( $conf->exists('cust-email-high-visibility') && !$pre ) {
+
+
+ <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
+ ? $r : '' %>Email address(es)
+ |
+
+
+ |
+
+% }
-<% include('/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'},
- )
-%>
+% unless ( $conf->exists('cust-edit-alt-field-order') ) { #standard order
-
- <% $daytime_label %> |
-
- <%$style%>>
- |
-
+ <& company &>
+ <& location &>
+ <& phones &>
+ <& fax &>
-
- <% $night_label %> |
-
- <%$style%>>
- |
-
+% } else { #alternate field order
-
- Fax |
-
- <%$style%>>
- |
-
+ <& phones &>
+ <& location &>
+ <& fax &>
+ <& company &>
+
+% }
% if ( $conf->exists('show_stateid') && !$pre ) {
@@ -64,15 +50,14 @@
<% $stateid_label %> |
<%$style%>> |
<% $stateid_state_label %> |
- <% include('/elements/select-state.html',
+ | <& /elements/select-state.html,
'state' => $cust_main->stateid_state,
'country' => $cust_main->country,
'prefix' => 'stateid_',
'onchange' => $onchange,
'disabled' => $disabled,
'style' => \@style,
- )
- %>
+ &>
|
% } elsif ( !$pre ) {
@@ -82,20 +67,90 @@
% }
-<%$r%>required fields
+<%$r%><% mt('required fields') |h %>
+
+<%def company>
+% my $display = ($cust_main->residential_commercial eq 'Commercial')
+% ? '' : 'none';
+
+ <% mt('Company') |h %> |
+
+ <%$style%>>
+ |
+
+%def>
+
+<%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>
+
+<%def phones>
+
+ <% mt('Phones') %> |
+
+
+
+ |
+
+%def>
+
+<%def fax>
+
+ <% mt('Fax') |h %> |
+
+ <%$style%>>
+ |
+
+%def>
+
+<%once>
+
+my $r = qq!* !;
+%once>
+<%shared>
+
+my( %opt, $cust_main, $pre, $onchange, $disabled, @style, $style,
+ $daytime_label, $night_label, $mobile_label,
+ );
+
+%shared>
<%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'};
-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'} } : () );
-#push @style, 'background-color: #dddddd' if $disabled;
-my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';
+$style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';
my $conf = new FS::Conf;
@@ -119,25 +174,18 @@ $cust_main->set('stateid_state', $cust_main->state )
$opt{geocode} ||= $cust_main->get('geocode');
-if ( $conf->exists('cust_main-require_censustract') ) {
- $opt{censustract} ||= $cust_main->censustract;
-}
+$opt{censustract} ||= $cust_main->censustract;
+
+$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($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 $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';
my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
? 'Driver’s License'
: FS::Msgcat::_gettext('stateid') || 'Driver’s License';
@@ -145,6 +193,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;
%init>