2 'name_singular' => 'deployment zone',
3 'table' => 'deploy_zone',
4 'post_url' => popurl(1).'process/deploy_zone-mobile.html',
5 'viewall_dir' => 'browse',
7 'description' => 'Description',
9 'dbaname' => 'Business name (if different from agent)',
10 'technology' => 'Technology',
11 'spectrum' => 'Spectrum',
12 'is_broadband', => 'Broadband Internet',
13 'adv_speed_up' => 'Upstream',
14 'adv_speed_down' => 'Downstream',
15 'is_voice', => 'Voice',
17 'active_date' => 'Active since',
20 { field => 'zonetype',
25 { field => 'active_date',
29 { field => 'agentnum',
30 type => 'select-agent',
32 viewall_right => 'Edit FCC report configuration for all agents',
35 { field => 'technology',
37 options => $media_types->{'Mobile Wireless'},
38 labels => $technology_labels,
40 { field => 'spectrum',
42 options => [ keys %$spectrum_labels ],
43 labels => $spectrum_labels,
45 { field => 'is_broadband', type => 'checkbox', value=>'Y' },
46 { field => 'is_voice', type => 'checkbox', value=>'Y' },
47 { type => 'tablebreak-tr-title',
48 value => 'Advertised minimum speed (Mbps)' },
51 { type => 'tablebreak-tr-title', value => 'Footprint'},
52 { field => 'vertices',
54 curr_value_callback => sub {
55 my ($cgi, $object) = @_;
56 $cgi->param('vertices') || $object->vertices_json;
60 # { field => 'vertexnum',
61 # type => 'deploy_zone_vertex',
62 # o2m_table => 'deploy_zone_vertex',
64 # m2_error_callback => $m2_error_callback,
69 my $curuser = $FS::CurrentUser::CurrentUser;
71 unless $curuser->access_right([
72 'Edit FCC report configuration',
73 'Edit FCC report configuration for all agents',
76 my $technology_labels = FS::part_pkg_fcc_option->technology_labels;
77 my $spectrum_labels = FS::part_pkg_fcc_option->spectrum_labels;
78 my $media_types = FS::part_pkg_fcc_option->media_types;
80 my $m2_error_callback = sub {
81 my ($cgi, $deploy_zone) = @_;
82 my @vertexnums = sort { $a <=> $b } grep {
83 /^vertexnum\d+/ and length($cgi->param($_.'_latitude'))
89 FS::deploy_zone_vertex->new({
90 vertexnum => scalar($cgi->param($k)),
91 zonenum => $deploy_zone->zonenum,
92 latitude => scalar($cgi->param($k.'_latitude')),
93 longitude => scalar($cgi->param($k.'_longitude')),