X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=inline;f=httemplate%2Felements%2Forder_pkg.js;h=8c1efd93a1192f1534fee15327d3032db1b2d910;hb=6cd8f3459488ce4cd1d9ec00452b1bab0bf03f8e;hp=2f53e363161b8f97b1a9e5bc8b34fea053dacb13;hpb=a78d8300b4be8ff4fbb4b5c64139d4c442b16c2f;p=freeside.git diff --git a/httemplate/elements/order_pkg.js b/httemplate/elements/order_pkg.js index 2f53e3631..8c1efd93a 100644 --- a/httemplate/elements/order_pkg.js +++ b/httemplate/elements/order_pkg.js @@ -8,8 +8,10 @@ function pkg_changed () { if ( discountnum ) { if ( form.pkgpart.options[form.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) { form.discountnum.disabled = false; + discountnum_changed(form.discountnum); } else { form.discountnum.disabled = true; + discountnum_changed(form.discountnum); } } @@ -17,18 +19,16 @@ function pkg_changed () { form.start_date_text.disabled = false; form.start_date.style.backgroundColor = '#ffffff'; form.start_date_button.style.display = ''; - form.start_date_button_disabled.style.display = 'none'; - form.invoice_terms.disabled = true; } else { form.start_date_text.disabled = true; form.start_date.style.backgroundColor = '#dddddd'; form.start_date_button.style.display = 'none'; - form.start_date_button_disabled.style.display = ''; } } else { form.submitButton.disabled = true; if ( discountnum ) { form.discountnum.disabled = true; } + discountnum_changed(form.discountnum); } } @@ -41,3 +41,7 @@ function standardize_new_location() { form.submit(); } } + +function submit_abort() { + document.OrderPkgForm.submitButton.disabled = false; +}