[freeside-commits] freeside/httemplate/elements tr-select-pkg_class.html, 1.7, 1.7.2.1

Ivan,,, ivan at wavetail.420.am
Mon Oct 26 16:17:59 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv30339

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	tr-select-pkg_class.html 
Log Message:
better fix for ignoring disabled package classes that doesn't search them twice

Index: tr-select-pkg_class.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-select-pkg_class.html,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- tr-select-pkg_class.html	11 Oct 2009 01:44:47 -0000	1.7
+++ tr-select-pkg_class.html	26 Oct 2009 23:17:57 -0000	1.7.2.1
@@ -1,6 +1,6 @@
-% if ( $count == 0 ) { 
+% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { 
 
-  <INPUT TYPE="hidden" NAME="<%  $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE="">
+  <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'classnum' %>" VALUE="">
 
 % } else { 
 
@@ -22,6 +22,6 @@
 my %opt = @_;
 my $classnum = $opt{'curr_value'} || $opt{'value'};
 
-my $count = scalar( qsearch( 'pkg_class', {} ) );
+$opt{'pkg_class'} ||= [ qsearch( 'pkg_class', { disabled=>'' } ) ];
 
 </%init>



More information about the freeside-commits mailing list