From d6be23266fb627a4e7831055bf55ae675dbad4e9 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 30 Jan 2010 20:05:16 +0000 Subject: discounts, RT#6679 --- httemplate/misc/order_pkg.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/order_pkg.html') diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 684f94e7c..e05205ba7 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -10,8 +10,14 @@ function enable_order_pkg () { if ( document.OrderPkgForm.pkgpart.selectedIndex > 0 ) { document.OrderPkgForm.submit.disabled = false; + if ( document.OrderPkgForm.pkgpart.options[document.OrderPkgForm.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) { + document.OrderPkgForm.discountnum.disabled = false; + } else { + document.OrderPkgForm.discountnum.disabled = true; + } } else { document.OrderPkgForm.submit.disabled = true; + document.OrderPkgForm.discountnum.disabled = true; } } @@ -61,7 +67,10 @@ % if ( $curuser->access_right('Discount customer package') ) { - <% include('/elements/tr-select-discount.html') %> + <% include('/elements/tr-select-discount.html', + 'element_etc' => 'DISABLED', + ) + %> % } % if ( $conf->exists('pkg_referral') ) { -- cgit v1.2.1