[freeside-commits] freeside/httemplate/elements order_pkg.js, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Mon Apr 11 16:06:18 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv23145/elements
Added Files:
order_pkg.js
Log Message:
fix usps-validation misfire and inability to submit on change package too, RT#12377, RT#12183
--- NEW FILE: order_pkg.js ---
function enable_order_pkg () {
var form = document.OrderPkgForm;
var discountnum = form.discountnum;
if ( form.pkgpart.selectedIndex > 0 ) {
form.submitButton.disabled = false;
if ( discountnum ) {
if ( form.pkgpart.options[form.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) {
form.discountnum.disabled = false;
} else {
form.discountnum.disabled = true;
}
}
} else {
form.submitButton.disabled = true;
if ( discountnum ) { form.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();
}
}
More information about the freeside-commits
mailing list