summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/order_pkg.js26
-rw-r--r--httemplate/elements/tr-select-cust-part_pkg.html4
2 files changed, 21 insertions, 9 deletions
diff --git a/httemplate/elements/order_pkg.js b/httemplate/elements/order_pkg.js
index a850d2193..d8ee790c2 100644
--- a/httemplate/elements/order_pkg.js
+++ b/httemplate/elements/order_pkg.js
@@ -5,15 +5,15 @@ function pkg_changed () {
usageprice_pkg_changed( opt.value );
- if ( form.pkgpart.selectedIndex > 0 ) {
+ var date_button = document.getElementById('start_date_button');
+ var date_button_disabled = document.getElementById('start_date_disabled');
+ var date_text = document.getElementById('start_date_text');
- var date_button = document.getElementById('start_date_button');
- var date_button_disabled = document.getElementById('start_date_disabled');
- var date_text = document.getElementById('start_date_text');
+ var radio_now = document.getElementById('start_now');
+ var radio_on_hold = document.getElementById('start_on_hold');
+ var radio_on_date = document.getElementById('start_on_date');
- var radio_now = document.getElementById('start_now');
- var radio_on_hold = document.getElementById('start_on_hold');
- var radio_on_date = document.getElementById('start_on_date');
+ if ( form.pkgpart.selectedIndex > 0 ) {
form.submitButton.disabled = false;
if ( discountnum ) {
@@ -39,8 +39,9 @@ function pkg_changed () {
date_button_disabled.style.display = 'none';
if ( radio_on_date ) {
// un-disable all the buttons that might get disabled
- radio_on_date.disabled = false;
radio_now.disabled = false;
+ radio_on_hold.disabled = false;
+ radio_on_date.disabled = false;
// if a start date has been entered, assume the user wants it
if ( form.start_date_text.value.length > 0 ) {
radio_now.checked = false;
@@ -72,6 +73,15 @@ function pkg_changed () {
} else {
form.submitButton.disabled = true;
+
+ date_text.style.backgroundColor = '#dddddd';
+ date_text.disabled = true;
+ date_button.style.display = 'none';
+ date_button_disabled.style.display = '';
+ radio_now.disabled = true;
+ radio_on_date.disabled = true;
+ radio_on_hold.disabled = true;
+
if ( discountnum ) { form.discountnum.disabled = true; }
discountnum_changed(form.discountnum);
}
diff --git a/httemplate/elements/tr-select-cust-part_pkg.html b/httemplate/elements/tr-select-cust-part_pkg.html
index 23916d9e2..6244b6cb7 100644
--- a/httemplate/elements/tr-select-cust-part_pkg.html
+++ b/httemplate/elements/tr-select-cust-part_pkg.html
@@ -53,9 +53,11 @@
what.form.pkgpart.disabled = ''; //re-enable part_pkg dropdown
% if ( $opt{'curr_value'} ) {
- what.form.pkgpart.value = <% $opt{'curr_value'} %>;
+ what.form.pkgpart.value = <% $opt{'curr_value'} %>;
% }
+ pkg_changed();
+
}
get_part_pkg( <% $cust_main ? $cust_main->custnum : '0' %>,