[freeside-commits] freeside/httemplate/edit tower.html, NONE, 1.1.2.2 svc_broadband.cgi, 1.24.2.1, 1.24.2.2
Ivan,,,
ivan at wavetail.420.am
Fri Dec 9 16:37:06 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv5092/httemplate/edit
Modified Files:
Tag: FREESIDE_2_3_BRANCH
svc_broadband.cgi
Added Files:
Tag: FREESIDE_2_3_BRANCH
tower.html
Log Message:
tower tracking, RT#15538
Index: svc_broadband.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_broadband.cgi,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -u -w -d -r1.24.2.1 -r1.24.2.2
--- svc_broadband.cgi 10 Nov 2011 21:40:25 -0000 1.24.2.1
+++ svc_broadband.cgi 10 Dec 2011 00:37:04 -0000 1.24.2.2
@@ -97,7 +97,9 @@
;
my @fields = (
- qw( description ip_addr speed_down speed_up blocknum ),
+ qw( description ip_addr speed_down speed_up ),
+ { field=>'sectornum', type=>'select-tower_sector', },
+ qw( blocknum ),
{ field=>'block_label', type=>'fixed' },
qw( mac_addr latitude longitude altitude vlan_profile
performance_profile authkey plan_id ),
--- NEW FILE: tower.html ---
<& elements/edit.html,
name_singular => 'tower',
table => 'tower',
viewall_dir => 'browse',
fields => [ 'towername',
{ field=>'disabled', type=>'checkbox', value=>'Y', },
{ field => 'sectornum',
type => 'tower_sector',
o2m_table => 'tower_sector',
m2_label => 'Sector',
m2_error_callback => $m2_error_callback,
},
],
labels => { 'towernum' => 'Tower',
'towername' => 'Name',
'sectornum' => 'Sector',
'disabled' => 'Disabled',
},
&>
<%init>
my $m2_error_callback = sub { # reconstruct the list
my ($cgi, $object) = @_;
my @fields = qw(sectorname ip_addr);
map {
my $k = $_;
next if !length($cgi->param($k.'_sectorname'));
new FS::tower_sector {
'towernum' => $object->towernum,
'sectornum' => scalar( $cgi->param($k) ),
map { $_ => scalar( $cgi->param($k.'_'.$_) ) } @fields,
};
} grep /^sectornum\d+$/, ($cgi->param);
};
</%init>
More information about the freeside-commits
mailing list