summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httemplate/elements/tr-select-cust_location.html5
-rw-r--r--httemplate/misc/order_pkg.html18
2 files changed, 21 insertions, 2 deletions
diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html
index 1399240d9..8b1895fae 100644
--- a/httemplate/elements/tr-select-cust_location.html
+++ b/httemplate/elements/tr-select-cust_location.html
@@ -199,7 +199,10 @@ Example:
<TR>
<<%$th%> ALIGN="right"><% $opt{'label'} || 'Service&nbsp;location' %></<%$th%>>
<TD COLSPAN=7>
- <SELECT NAME="locationnum" onChange="locationnum_changed(this);">
+ <SELECT NAME = "locationnum"
+ ID = "locationnum"
+ onChange = "locationnum_changed(this);"
+ >
% if ( !$prospect_main && !$opt{'disable_empty'} ) {
<OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
% }
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>