event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / select-agent.html
index 3107ff9..54069a5 100644 (file)
@@ -1,10 +1,3 @@
-%
-%  my( $agentnum, %opt ) = @_;
-%
-%  $opt{'records'} = delete $opt{'agents'}
-%    if $opt{'agents'};
-%
-%
 <% include( '/elements/select-table.html',
                  'table'       => 'agent',
                  'name_col'    => 'agent',
                  %opt,
              )
 %>
+<%init>
+
+my %opt = @_;
+my $agentnum = $opt{'curr_value'} || $opt{'value'};
+
+$opt{'records'} = delete $opt{'agents'}
+  if $opt{'agents'};
+
+</%init>