X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Forder_pkg.html;h=17db18714e1be2e4534f60da6b906121d011c643;hb=f6e967c7686cbf6381a88709ae50d859c521df20;hp=684f94e7c47a276d75901aebfa03c149716f4efd;hpb=2d5f9e43a60773a9b079e96c330cb9e0e089800a;p=freeside.git diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 684f94e7c..17db18714 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -9,9 +9,25 @@ function enable_order_pkg () { if ( document.OrderPkgForm.pkgpart.selectedIndex > 0 ) { - document.OrderPkgForm.submit.disabled = false; + document.OrderPkgForm.submitButton.disabled = false; + if ( document.OrderPkgForm.pkgpart.options[document.OrderPkgForm.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) { + document.OrderPkgForm.discountnum.disabled = false; + } else { + document.OrderPkgForm.discountnum.disabled = true; + } } else { - document.OrderPkgForm.submit.disabled = true; + document.OrderPkgForm.submitButton.disabled = true; + document.OrderPkgForm.discountnum.disabled = true; + } + } + + 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(); } } @@ -22,46 +38,56 @@