clean up existing packages when changing supplemental package defs, #31194
[freeside.git] / httemplate / elements / tr-select-agent_type.html
index 3fcbcd3..9ea943b 100644 (file)
@@ -1,8 +1,8 @@
-%#% if ( scalar(@agent_types) == 1 ) { 
-%#
-%#  <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'typenum' %>" VALUE="<% $agent_types[0]->typenum %>">
-%#
-%#% } else { 
+% if ( scalar(@agent_types) == 1 ) { 
+
+  <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'typenum' %>" VALUE="<% $agent_types[0]->typenum %>">
+
+% } else { 
 
   <TR>
     <TD ALIGN="right"><% $opt{'label'} || 'Agent Type' %></TD>
     </TD>
   </TR>
 
-%#% } 
+% } 
 
 <%init>
 
 my %opt = @_;
 my $typenum = $opt{'curr_value'} || $opt{'value'};
 
-delete $opt{'agent_types'} if $opt{'agent_types'}; #?
+my @agent_types = qsearch('agent_type', {});
 
 </%init>