[freeside-commits] freeside/httemplate/edit cust_main_county-expand.cgi, 1.14, 1.15 cust_main.cgi, 1.102, 1.103
Ivan,,,
ivan at wavetail.420.am
Sun Oct 11 18:45:14 PDT 2009
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.168, 1.169 cust_main_county.pm, 1.23, 1.24 Misc.pm, 1.33, 1.34 Mason.pm, 1.19, 1.20
- Next message: [freeside-commits] freeside/httemplate/edit/process cust_main_county-expand.cgi, 1.12, 1.13 cust_main_county-collapse.cgi, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv1395/httemplate/edit
Modified Files:
cust_main_county-expand.cgi cust_main.cgi
Log Message:
UI for per-city taxes (setup and assigning to customers/package locations), RT#5852
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main.cgi,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- cust_main.cgi 7 Aug 2009 23:08:03 -0000 1.102
+++ cust_main.cgi 12 Oct 2009 01:45:12 -0000 1.103
@@ -45,9 +45,11 @@
% my $same_checked = '';
% my $ship_disabled = '';
+% my @ship_style = ();
% unless ( $cust_main->ship_last && $same ne 'Y' ) {
% $same_checked = 'CHECKED';
-% $ship_disabled = 'DISABLED STYLE="background-color: #dddddd"';
+% $ship_disabled = 'DISABLED';
+% push @ship_style, 'background-color:#dddddd';
% foreach (
% qw( last first company address1 address2 city county state zip country
% daytime night fax )
@@ -74,14 +76,20 @@
function bill_changed(what) {
if ( what.form.same.checked ) {
% for (qw( last first company address1 address2 city zip daytime night fax )) {
-
what.form.ship_<%$_%>.value = what.form.<%$_%>.value;
% }
what.form.ship_country.selectedIndex = what.form.country.selectedIndex;
+ function fix_ship_city() {
+ what.form.ship_city_select.selectedIndex = what.form.city_select.selectedIndex;
+ what.form.ship_city.style.display = what.form.city.style.display;
+ what.form.ship_city_select.style.display = what.form.city_select.style.display;
+ }
+
function fix_ship_county() {
what.form.ship_county.selectedIndex = what.form.county.selectedIndex;
+ ship_county_changed(what.form.ship_county, fix_ship_city );
}
function fix_ship_state() {
@@ -97,7 +105,8 @@
if ( what.checked ) {
bill_changed(what);
-% for (qw( last first company address1 address2 city county state zip country daytime night fax )) {
+% my @fields = qw( last first company address1 address2 city city_select county state zip country daytime night fax );
+% for (@fields) {
what.form.ship_<%$_%>.disabled = true;
what.form.ship_<%$_%>.style.backgroundColor = '#dddddd';
% }
@@ -111,7 +120,7 @@
} else {
-% for (qw( last first company address1 address2 city county state zip country daytime night fax )) {
+% for (@fields) {
what.form.ship_<%$_%>.disabled = false;
what.form.ship_<%$_%>.style.backgroundColor = '#ffffff';
% }
@@ -136,6 +145,7 @@
'pre' => 'ship_',
'onchange' => '',
'disabled' => $ship_disabled,
+ 'style' => \@ship_style
)
%>
Index: cust_main_county-expand.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main_county-expand.cgi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cust_main_county-expand.cgi 20 Feb 2008 01:10:31 -0000 1.14
+++ cust_main_county-expand.cgi 12 Oct 2009 01:45:12 -0000 1.15
@@ -37,9 +37,11 @@
my $title;
-die "Can't expand entry!" if $cust_main_county->county;
+die "Can't expand entry!" if $cust_main_county->city;
-if ( $cust_main_county->state ) {
+if ( $cust_main_county->county ) {
+ $title = 'Cities';
+} elsif ( $cust_main_county->state ) {
$title = 'Counties';
} else {
$title = 'States/Provinces';
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.168, 1.169 cust_main_county.pm, 1.23, 1.24 Misc.pm, 1.33, 1.34 Mason.pm, 1.19, 1.20
- Next message: [freeside-commits] freeside/httemplate/edit/process cust_main_county-expand.cgi, 1.12, 1.13 cust_main_county-collapse.cgi, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list