[freeside-commits] freeside/httemplate/elements tr-select-reason.html, 1.1, 1.2

Jeff Finucane,420,, jeff at wavetail.420.am
Sun Oct 22 21:21:06 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv31107/httemplate/elements

Modified Files:
	tr-select-reason.html 
Log Message:
events should attach reasons

Index: tr-select-reason.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-select-reason.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tr-select-reason.html	19 Oct 2006 14:26:27 -0000	1.1
+++ tr-select-reason.html	23 Oct 2006 04:21:03 -0000	1.2
@@ -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') {



More information about the freeside-commits mailing list