diff options
author | Mark Wells <mark@freeside.biz> | 2013-07-06 17:30:47 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-07-06 17:30:47 -0700 |
commit | 8240403713de07e6b9c1d8a645838791e80823b7 (patch) | |
tree | cc9e0f177e9a764b9dc231f1a1458cdb7104ce9e /httemplate/elements/tr-select-cust-part_pkg.html | |
parent | 5e4d3c3f6b9b1aa27ff66f4c772f8f8a8c7ade54 (diff) |
delayed package start option, #20686
Diffstat (limited to 'httemplate/elements/tr-select-cust-part_pkg.html')
-rw-r--r-- | httemplate/elements/tr-select-cust-part_pkg.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/httemplate/elements/tr-select-cust-part_pkg.html b/httemplate/elements/tr-select-cust-part_pkg.html index 848ab0a4b..b9dc5a75a 100644 --- a/httemplate/elements/tr-select-cust-part_pkg.html +++ b/httemplate/elements/tr-select-cust-part_pkg.html @@ -7,10 +7,11 @@ <SCRIPT TYPE="text/javascript"> - function part_pkg_opt(what, value, text, can_discount, can_start_date) { + function part_pkg_opt(what, value, text, can_discount, can_start_date, start_date) { var optionName = new Option(text, value, false, false); optionName.setAttribute('data-can_discount', can_discount); optionName.setAttribute('data-can_start_date', can_start_date); + optionName.setAttribute('data-start_date', start_date); var length = what.length; what.options[length] = optionName; } @@ -38,12 +39,14 @@ // add the new packages opt(what.form.pkgpart, '', 'Select package'); var packagesArray = eval('(' + part_pkg + ')' ); - for ( var s = 0; s < packagesArray.length; s=s+4 ) { + for ( var s = 0; s < packagesArray.length; s=s+5 ) { + //surely this should be some kind of JSON structure var packagesLabel = packagesArray[s+1]; var can_discount = packagesArray[s+2]; var can_start_date = packagesArray[s+3]; + var start_date = packagesArray[s+4]; part_pkg_opt( - what.form.pkgpart, packagesArray[s], packagesLabel, can_discount, can_start_date + what.form.pkgpart, packagesArray[s], packagesLabel, can_discount, can_start_date, start_date ); } @@ -58,6 +61,10 @@ ); } + window.onload = function() { + classnum_changed(document.getElementById('classnum')); + } + </SCRIPT> <TR> |