summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-reason.html
diff options
context:
space:
mode:
authorjeff <jeff>2006-10-23 04:21:04 +0000
committerjeff <jeff>2006-10-23 04:21:04 +0000
commit9811b8ce65909a293810ddbcd8c9b5ca963fba01 (patch)
treef6b76e94f276eaabbaf58b50a39493cb91d0c7ab /httemplate/elements/tr-select-reason.html
parent1043b612a287f6ccc6bbe32357483019d390f840 (diff)
events should attach reasons
Diffstat (limited to 'httemplate/elements/tr-select-reason.html')
-rwxr-xr-xhttemplate/elements/tr-select-reason.html8
1 files changed, 7 insertions, 1 deletions
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',
% });
+ <OPTION VALUE="" <% ($init_reason eq "") ? 'SELECTED' : '' %>>Select Reason...</OPTION>
% foreach my $reason (@reasons) {
<OPTION VALUE="<% $reason->reasonnum %>" <% ($init_reason == $reason->reasonnum) ? 'SELECTED' : '' %>><% $reason->reason %></OPTION>
% }
@@ -68,7 +74,7 @@
</TR>
<%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') {