X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-cust-part_pkg.html;h=8431beb4e36ab83ec74819b7c1bba7ecec67509b;hb=5fa459e35a04b69cbdc6b5b938eabcbc1bac6c74;hp=b9dc5a75a5769466aaf9c5d0407ef02c57870044;hpb=8240403713de07e6b9c1d8a645838791e80823b7;p=freeside.git diff --git a/httemplate/elements/tr-select-cust-part_pkg.html b/httemplate/elements/tr-select-cust-part_pkg.html index b9dc5a75a..8431beb4e 100644 --- a/httemplate/elements/tr-select-cust-part_pkg.html +++ b/httemplate/elements/tr-select-cust-part_pkg.html @@ -11,7 +11,7 @@ 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); + optionName.setAttribute('data-start_date', start_date || ''); var length = what.length; what.options[length] = optionName; } @@ -20,7 +20,7 @@ what.form.pkgpart.disabled = 'disabled'; //disable part_pkg dropdown var submitButton = what.form.submitButton; // || what.form.submit; - if ( submitButton ) { + if ( submitButton && <% $opt{'curr_value'} ? 0 : 1 %> ) { submitButton.disabled = true; //disable the submit button } var discountnum = what.form.discountnum; @@ -51,6 +51,9 @@ } what.form.pkgpart.disabled = ''; //re-enable part_pkg dropdown +% if ( $opt{'curr_value'} ) { + what.form.pkgpart.value = <% $opt{'curr_value'} %>; +% } } @@ -61,9 +64,9 @@ ); } - window.onload = function() { + <&| /elements/onload.js &> classnum_changed(document.getElementById('classnum')); - } +