%init> my %opt = @_; my $tower = $opt{'object'}; my $towernum = $tower->towernum; my $cgi = $opt{'cgi'}; my $tabcounter = 0; my @fields = qw( sectorname ip_addr height freq_mhz direction width tilt v_width db_high db_low sector_range ); my @sectors; if ( $cgi->param('error') ) { foreach my $k ($cgi->param) { if ($k =~ /^sectornum\d+$/) { my $sectornum = $cgi->param($k); my $sector = FS::tower_sector->new({ 'sectornum' => $sectornum, 'towernum' => $towernum, map { $_ => scalar($cgi->param($k.'_'.$_)) } @fields, }); push @sectors, $sector if length($sector->sectorname); } } } elsif ( $towernum ) { @sectors = $tower->tower_sector; } # else new mode, no sectors yet my $id = $opt{id} || $opt{field} || 'sectornum'; %init> <& tablebreak-tr-title.html, %opt &>
<% emt('feet above ground') %>
° °
<% emt('MHz') %>
° °