X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fcontact.html;h=3dd24aae55a185fe4a26ac2f9f97d3b38289e35c;hb=8c5a1df1a46121c75a829eb1d57956c9731940ab;hp=58fee3291a08514973bd21ab0b8e15847e9d2571;hpb=ca87d33422b2d19d28773b6f2937cdb84863b124;p=freeside.git
diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html
index 58fee3291..3dd24aae5 100644
--- a/httemplate/edit/cust_main/contact.html
+++ b/httemplate/edit/cust_main/contact.html
@@ -1,14 +1,14 @@
<% &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 ) {
@@ -18,83 +18,115 @@
+% if ( $conf->exists('cust-email-high-visibility') && !$pre ) {
+
+
+ <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es)
+ |
+
+
+ |
+
+% }
+
+% unless ( $conf->exists('cust-edit-alt-field-order') ) {
- Company |
+ <% mt('Company') |h %> |
- >
+ <%$style%>>
|
+<& /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'},
+&>
+
- <%$r%>Address |
-
- >
+ | <% $daytime_label %> |
+
+ <%$style%>>
|
- |
-
- >
+ | <% $night_label %> |
+
+ <%$style%>>
|
- <%$r%>City |
-
- >
- |
- ><%$r%>County |
-
- <% include('select-county.html', %select_hash ) %>
- |
- <%$r%>State |
-
- <% include('select-state.html', %select_hash ) %>
- |
- <%$r%>Zip |
-
- >
+ | <% mt('Fax') |h %> |
+
+ <%$style%>>
|
-
- <%$r%>Country |
- <% include('select-country.html', %select_hash ) %> |
-
+% } else {
<% $daytime_label %> |
- >
+ <%$style%>>
|
<% $night_label %> |
- >
+ <%$style%>>
|
+<& /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'},
+&>
+
- Fax |
+ <% mt('Fax') |h %> |
- >
+ <%$style%>>
+ |
+
+
+
+ <% mt('Company') |h %> |
+
+ <%$style%>>
|
+% }
+
% if ( $conf->exists('show_stateid') && !$pre ) {
<% $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,
+ &>
+ |
% } elsif ( !$pre ) {
@@ -103,11 +135,19 @@
% }
-<%$r%>required fields
+<%$r%><% mt('required fields') |h %>
<%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'} } : () );
+
+my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';
+
my $conf = new FS::Conf;
foreach (qw(ss stateid)) {
@@ -128,28 +168,11 @@ $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"';
+$opt{geocode} ||= $cust_main->get('geocode');
+
+if ( $conf->exists('cust_main-require_censustract') ) {
+ $opt{censustract} ||= $cust_main->censustract;
+}
my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
? 'Day Phone'
@@ -166,4 +189,6 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st
my $r = qq!* !;
+my @invoicing_list = $cust_main->invoicing_list;
+
%init>