- my @agents;
- if ( $opt{'agents'} ) {
- @agents = @{ $opt{'agents'} };
- } else {
- @agents = qsearch( 'agent', { disabled=>'' } );
- }
-
+ my %select_opt = ();
+ $select_opt{'records'} = $opt{'agents'}
+ if $opt{'agents'};
+
+%><%= include( '/elements/select-table.html',
+ 'table' => 'agent',
+ 'name_col' => 'agent',
+ 'value' => $agentnum,
+ 'empty_label' => 'all',
+ 'hashref' => { 'disabled' => '' },
+ %select_opt,
+ )