Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / elements / select-cust-fields.html
index 4d47fbe..5e30638 100644 (file)
@@ -1,23 +1,20 @@
-<%
+<%init>
   my( $cust_fields, %opt ) = @_;
 
   use FS::ConfDefaults;
   $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ];
 
   tie my %hash, 'Tie::IxHash', @{ $opt{'avail_fields'} };
-
-%>
+</%init>
 
 <SELECT NAME="cust_fields">
 
   <OPTION VALUE="">(configured default)
 
-  <% 
-     foreach my $value ( keys %hash ) { %>
-
-       <OPTION VALUE="<%= $value %>"><%= $hash{$value} %>
+% foreach my $value ( keys %hash ) { 
+  <OPTION VALUE="<% $value %>"><% $hash{$value} %>
+% } 
 
-  <% } %>
 
 </SELECT>