<& /elements/select-table.html,
table => 'tower_sector',
name_col => 'description',
+ addl_from => 'JOIN tower USING (towernum)',
+ extra_sql => $extra_sql,
order_by => 'ORDER BY towernum,sectorname',
empty_label => ' ',
@_
<& /elements/select-table.html,
table => 'tower',
name_col => 'towername',
+ hashref => { 'disabled' => '', },
id => 'towernum',
field => 'towernum',
onchange => 'change_towernum(this.value);',
}
my $empty_label = $opt{'empty_label'} || 'Include services with no sector';
+
+my $extra_sql = q(WHERE (disabled = '' OR disabled IS NULL));
+$extra_sql .= q( AND sectorname != '_default') if $opt{'sectorsonly'};
</%init>