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',
26 type => 'input-date-field',
27 curr_value_callback => sub {
28 my ($cgi, $object) = @_;
29 $cgi->param('active_date') || $object->active_date || time;
32 { field => 'agentnum',
33 type => 'select-agent',
35 viewall_right => 'Edit FCC report configuration for all agents',
38 { field => 'technology',
40 options => $media_types->{'Mobile Wireless'},
41 labels => $technology_labels,
43 { field => 'spectrum',
45 options => [ keys %$spectrum_labels ],
46 labels => $spectrum_labels,
48 { field => 'is_broadband', type => 'checkbox', value=>'Y' },
49 { field => 'is_voice', type => 'checkbox', value=>'Y' },
50 { type => 'tablebreak-tr-title',
51 value => 'Advertised minimum speed (Mbps)' },
54 { type => 'tablebreak-tr-title', value => 'Footprint'},
55 { field => 'vertices',
57 curr_value_callback => sub {
58 my ($cgi, $object) = @_;
59 $cgi->param('vertices') || $object->vertices_json;
63 # { field => 'vertexnum',
64 # type => 'deploy_zone_vertex',
65 # o2m_table => 'deploy_zone_vertex',
67 # m2_error_callback => $m2_error_callback,
72 my $curuser = $FS::CurrentUser::CurrentUser;
74 unless $curuser->access_right([
75 'Edit FCC report configuration',
76 'Edit FCC report configuration for all agents',
79 my $technology_labels = FS::part_pkg_fcc_option->technology_labels;
80 my $spectrum_labels = FS::part_pkg_fcc_option->spectrum_labels;
81 my $media_types = FS::part_pkg_fcc_option->media_types;
83 my $m2_error_callback = sub {
84 my ($cgi, $deploy_zone) = @_;
85 my @vertexnums = sort { $a <=> $b } grep {
86 /^vertexnum\d+/ and length($cgi->param($_.'_latitude'))
92 FS::deploy_zone_vertex->new({
93 vertexnum => scalar($cgi->param($k)),
94 zonenum => $deploy_zone->zonenum,
95 latitude => scalar($cgi->param($k.'_latitude')),
96 longitude => scalar($cgi->param($k.'_longitude')),