<& /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 => 'dummy_towernum',
+ field => 'towernum',
onchange => 'change_towernum(this.value);',
element_etc => 'STYLE="vertical-align:top"',
&>
}
}
-my $empty_label = $opt{'empty_label'} || 'Include services with no tower/sector';
+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>