diff options
author | ivan <ivan> | 2011-04-11 01:24:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-04-11 01:24:41 +0000 |
commit | b09d6c6464fa59fb4a0797df00ce1f2aec051b6c (patch) | |
tree | e1d0259b8369d73c2da4470eb778f3b2a721dbce /httemplate/misc | |
parent | 356bb8925386a8a7a5fd49916130329178fceee5 (diff) |
fix misfire of USPS address correction on non-new locations, RT#12183
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/order_pkg.html | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 17c56055e..18ad74606 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -94,6 +94,7 @@ <INPUT TYPE = "hidden" NAME = "locationnum" + ID = "locationnum" VALUE = "<% scalar($cgi->param('lock_locationnum')) |h %>" > @@ -136,7 +137,7 @@ <BR> % my $onclick = $cgi->param('lock_locationnum') % ? 'document.OrderPkgForm.submit()' -% : 'standardize_locations()'; +% : 'standardize_new_location()'; <INPUT NAME="submitButton" TYPE="button" VALUE="Order Package" @@ -144,6 +145,21 @@ <% $pkgpart ? '' : 'DISABLED' %> > +<SCRIPT TYPE="text/javascript"> + + function standardize_new_location() { + var form = document.OrderPkgForm; + var loc = form.locationnum; + if (loc.type = 'select-one' && loc.options[loc.selectedIndex].value == -1) { + standardize_locations(); + } else { + form.submit(); + } + } + +</SCRIPT> + + </FORM> </BODY> </HTML> |