2 'name_singular' => 'deployment zone',
3 'table' => 'deploy_zone',
4 'post_url' => popurl(1).'process/deploy_zone-fixed.html',
5 'viewall_dir' => 'browse',
7 'zonenum' => 'Deployment zone',
8 'description' => 'Description',
10 'dbaname' => 'Business name (if different from agent)',
11 'technology' => 'Technology',
12 'adv_speed_up' => 'Upstream',
13 'adv_speed_down' => 'Downstream',
14 'cir_speed_up' => 'Upstream',
15 'cir_speed_down' => 'Downstream',
16 'is_consumer' => 'Consumer/mass market',
17 'is_business' => 'Business/government',
18 'disabled' => 'Disabled',
20 'active_date' => 'Active since',
21 'file' => 'Import blocks from text file',
22 'censusyear' => 'as census year',
26 { field => 'zonetype',
30 { field => 'is_broadband',
35 { field => 'active_date',
36 type => 'input-date-field',
37 curr_value_callback => sub {
38 my ($cgi, $object) = @_;
39 $cgi->param('active_date') || $object->active_date || time;
42 { field => 'expire_date',
45 { field => 'agentnum',
46 type => 'select-agent',
48 viewall_right => 'Edit FCC report configuration for all agents',
51 { field => 'technology',
53 options => [ map { @$_ } values(%$media_types) ],
54 labels => $technology_labels,
56 { field => 'is_consumer', type => 'checkbox', value=>'Y' },
57 { field => 'is_business', type => 'checkbox', value=>'Y' },
58 { field => 'disabled', type=>'checkbox', value=>'Y', },
59 { type => 'tablebreak-tr-title',
60 value => 'Advertised maximum speed (Mbps)' },
63 { type => 'tablebreak-tr-title',
64 value => 'Contractually guaranteed speed (Mbps)' },
67 { type => 'tablebreak-tr-title', value => 'Footprint'},
68 { field => 'vertices',
70 curr_value_callback => sub {
71 my ($cgi, $object) = @_;
72 $cgi->param('vertices') || $object->vertices_json;
76 # { type => 'tablebreak-tr-title', value => 'Census blocks'},
78 # type => 'file-upload',
80 # { field => 'format',
84 # { field => 'censusyear',
86 # options => [ '', qw( 2013 2012 2011 ) ],
89 # { type => 'tablebreak-tr-title', value => '', },
90 # { field => 'blocknum',
91 # type => 'deploy_zone_block',
92 # o2m_table => 'deploy_zone_block',
94 # m2_error_callback => $m2_error_callback,
99 my $curuser = $FS::CurrentUser::CurrentUser;
101 unless $curuser->access_right([
102 'Edit FCC report configuration',
103 'Edit FCC report configuration for all agents',
106 my $technology_labels = FS::part_pkg_fcc_option->technology_labels;
107 my $media_types = FS::part_pkg_fcc_option->media_types;
108 delete $media_types->{'Mobile Wireless'}; # cause this is the fixed zone page
110 #my $m2_error_callback = sub {
111 # my ($cgi, $deploy_zone) = @_;
112 # my @blocknums = grep {
113 # /^blocknum\d+/ and length($cgi->param($_.'_censusblock'))
116 # sort { $a->censusblock <=> $b->censusblock }
119 # FS::deploy_zone_block->new({
120 # blocknum => scalar($cgi->param($k)),
121 # zonenum => $deploy_zone->zonenum,
122 # censusblock => scalar($cgi->param($k.'_censusblock')),
123 # censusyear => scalar($cgi->param($k.'_censusyear')),