From 9811b8ce65909a293810ddbcd8c9b5ca963fba01 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 23 Oct 2006 04:21:04 +0000 Subject: events should attach reasons --- httemplate/elements/tr-select-reason.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/tr-select-reason.html b/httemplate/elements/tr-select-reason.html index 6c66e8170..0c05ae74e 100755 --- a/httemplate/elements/tr-select-reason.html +++ b/httemplate/elements/tr-select-reason.html @@ -4,6 +4,11 @@ { %if ($curuser->access_right($access_right)){ + if (document.getElementById('<% $name %>').selectedIndex == 0){ + <% $controlledbutton ? $controlledbutton.'.disabled = true;' : ';' %> + }else{ + <% $controlledbutton ? $controlledbutton.'.disabled = false;' : ';' %> + } if (document.getElementById('<% $name %>').selectedIndex == (document.getElementById('<% $name %>').length - 1)) { @@ -36,6 +41,7 @@ % extra_sql => $extra_sql, % addl_from => 'LEFT JOIN reason_type ON reason_type.typenum = reason.reason_type', % }); + % foreach my $reason (@reasons) { % } @@ -68,7 +74,7 @@ <%init> -my($name, $class, $init_reason, $init_type, $init_newreason) = @_; +my($name, $class, $init_reason, $init_type, $init_newreason, $controlledbutton) = @_; my($extra_sql, $curuser, $access_right, $display, $disabled); if ($class eq 'C') { -- cgit v1.2.1