% if ( ! $opt{'multiple'} ) { <& /elements/select-table.html, table => 'tower_sector', name_col => 'description', order_by => 'ORDER BY towernum,sectorname', empty_label => ' ', @_ &> % } % else { # currently only multiple sectors, not towers <& /elements/select-table.html, table => 'tower', name_col => 'towername', id => 'towernum', field => 'dummy_towernum', onchange => 'change_towernum(this.value);', element_etc => 'STYLE="vertical-align:top"', &>
No sector <%init> my %opt = @_; my %sectors_of; if ( $opt{'multiple'} ) { foreach my $sector ( qsearch('tower_sector',{}) ) { $sectors_of{$sector->towernum} ||= {}; $sectors_of{$sector->towernum}->{$sector->sectornum} = $sector->sectorname; $sectors_of{''}->{$sector->sectornum} = $sector->description; } }