From: ivan Date: Mon, 12 Oct 2009 01:58:23 +0000 (+0000) Subject: UI for per-city taxes (setup and assigning to customers/package locations), RT#5852 X-Git-Tag: root_of_svc_elec_features~774 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=c676664d00f6b98130b9d0c12b9ca524288725a3 UI for per-city taxes (setup and assigning to customers/package locations), RT#5852 --- diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index 3ccee62e5..feb61db8d 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -3,8 +3,8 @@ <%$r%>Contact name
(last, first) - > , - > + <%$style%>> , + <%$style%>> % if ( $conf->exists('show_ss') && !$pre ) { @@ -21,7 +21,7 @@ Company - > + <%$style%>> @@ -30,6 +30,7 @@ 'object' => $cust_main, 'onchange' => $onchange, 'disabled' => $disabled, + 'style' => \@style, 'same_checked' => $opt{'same_checked'}, 'geocode' => $opt{'geocode'}, 'censustract' => $opt{'censustract'}, @@ -39,21 +40,21 @@ <% $daytime_label %> - > + <%$style%>> <% $night_label %> - > + <%$style%>> Fax - > + <%$style%>> @@ -61,7 +62,7 @@ <% $stateid_label %> - > + <%$style%>> <% $stateid_state_label %> <% include('/elements/select-state.html', 'state' => $cust_main->stateid_state, @@ -69,6 +70,7 @@ 'prefix' => 'stateid_', 'onchange' => $onchange, 'disabled' => $disabled, + 'style' => \@style, ) %> @@ -90,6 +92,10 @@ my $cust_main = $opt{'cust_main'}; my $pre = $opt{'pre'}; my $onchange = $opt{'onchange'}; my $disabled = $opt{'disabled'}; +my @style = ( $opt{'style'} ? @{ $opt{'style'} } : () ); + +#push @style, 'background-color: #dddddd' if $disabled; +my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; my $conf = new FS::Conf; diff --git a/httemplate/elements/select-country.html b/httemplate/elements/select-country.html index 45b0ccd5f..e5656dc0c 100644 --- a/httemplate/elements/select-country.html +++ b/httemplate/elements/select-country.html @@ -53,8 +53,11 @@ Example: } //run the callback - if ( callback != null ) + if ( callback != null ) { callback(); + } else { + <% $pre %>state_changed(what.form.<% $pre %>state); + } } // go get the new states