diff options
| author | Mark Wells <mark@freeside.biz> | 2013-07-06 16:50:09 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2013-07-06 17:06:47 -0700 |
| commit | 90398f046915a915f65976e33ce060ac5baabbae (patch) | |
| tree | fbf7f3702eabe8fe500584c13a7de7278727945e /httemplate/elements/tr-select-cust-part_pkg.html | |
| parent | d3b736c3603a980b67f7c69242c94f6ad31a12a1 (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 767d23264..af66fc31d 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 ); } @@ -55,6 +58,10 @@ } + window.onload = function() { + classnum_changed(document.getElementById('classnum')); + } + </SCRIPT> <TR> |
