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;
}
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;
}
what.form.pkgpart.disabled = ''; //re-enable part_pkg dropdown
+% if ( $opt{'curr_value'} ) {
+ what.form.pkgpart.value = <% $opt{'curr_value'} %>;
+% }
}