X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fdeploy_zone-fixed.html;h=ce98c46e8b0dbcc16c5c897c15497c6362991c3b;hp=90d1b6667339b9ea9ffa4c2dc7b65dca65f1a9fa;hb=20961c94ea06ad3aa71fad2bd7f6903f83f02ebc;hpb=46ba9270a226ef01d0c29635373aef09ae42d372 diff --git a/httemplate/edit/deploy_zone-fixed.html b/httemplate/edit/deploy_zone-fixed.html index 90d1b6667..ce98c46e8 100644 --- a/httemplate/edit/deploy_zone-fixed.html +++ b/httemplate/edit/deploy_zone-fixed.html @@ -4,6 +4,7 @@ 'post_url' => popurl(1).'process/deploy_zone-fixed.html', 'viewall_dir' => 'browse', 'labels' => { + 'zonenum' => 'Deployment zone', 'description' => 'Description', 'agentnum' => 'Agent', 'dbaname' => 'Business name (if different from agent)', @@ -14,11 +15,13 @@ 'cir_speed_down' => 'Downstream', 'is_consumer' => 'Consumer/mass market', 'is_business' => 'Business/government', + 'disabled' => 'Disabled', 'blocknum' => '', 'active_date' => 'Active since', 'file' => 'Import blocks from text file', 'censusyear' => 'as census year', }, + 'fields' => [ { field => 'zonetype', type => 'hidden', @@ -30,8 +33,14 @@ }, 'description', { field => 'active_date', - type => 'fixed-date', - value => time, + type => 'input-date-field', + curr_value_callback => sub { + my ($cgi, $object) = @_; + $cgi->param('active_date') || $object->active_date || time; + }, + }, + { field => 'expire_date', + type => 'hidden', }, { field => 'agentnum', type => 'select-agent', @@ -46,6 +55,7 @@ }, { field => 'is_consumer', type => 'checkbox', value=>'Y' }, { field => 'is_business', type => 'checkbox', value=>'Y' }, + { field => 'disabled', type=>'checkbox', value=>'Y', }, { type => 'tablebreak-tr-title', value => 'Advertised maximum speed (Mbps)' }, 'adv_speed_down', @@ -54,29 +64,36 @@ value => 'Contractually guaranteed speed (Mbps)' }, 'cir_speed_down', 'cir_speed_up', - - { type => 'tablebreak-tr-title', value => 'Census blocks'}, - { field => 'file', - type => 'file-upload', - }, - { field => 'format', - type => 'hidden', - value => 'plain', - }, - { field => 'censusyear', - type => 'select', - options => [ '', qw( 2013 2012 2011 ) ], - }, - - { type => 'tablebreak-tr-title', value => '', }, - { field => 'blocknum', - type => 'deploy_zone_block', - o2m_table => 'deploy_zone_block', - m2_label => ' ', - m2_error_callback => $m2_error_callback, - }, + { type => 'tablebreak-tr-title', value => 'Footprint'}, + { field => 'vertices', + type => 'polygon', + curr_value_callback => sub { + my ($cgi, $object) = @_; + $cgi->param('vertices') || $object->vertices_json; + }, + } +# +# { type => 'tablebreak-tr-title', value => 'Census blocks'}, +# { field => 'file', +# type => 'file-upload', +# }, +# { field => 'format', +# type => 'hidden', +# value => 'plain', +# }, +# { field => 'censusyear', +# type => 'hidden', +# options => [ '', qw( 2013 2012 2011 ) ], +# }, +# +# { type => 'tablebreak-tr-title', value => '', }, +# { field => 'blocknum', +# type => 'deploy_zone_block', +# o2m_table => 'deploy_zone_block', +# m2_label => ' ', +# m2_error_callback => $m2_error_callback, +# }, ], - &> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -90,22 +107,22 @@ my $technology_labels = FS::part_pkg_fcc_option->technology_labels; my $media_types = FS::part_pkg_fcc_option->media_types; delete $media_types->{'Mobile Wireless'}; # cause this is the fixed zone page -my $m2_error_callback = sub { - my ($cgi, $deploy_zone) = @_; - my @blocknums = grep { - /^blocknum\d+/ and length($cgi->param($_.'_censusblock')) - } $cgi->param; - - sort { $a->censusblock <=> $b->censusblock } - map { - my $k = $_; - FS::deploy_zone_block->new({ - blocknum => scalar($cgi->param($k)), - zonenum => $deploy_zone->zonenum, - censusblock => scalar($cgi->param($k.'_censusblock')), - censusyear => scalar($cgi->param($k.'_censusyear')), - }) - } @blocknums; -}; +#my $m2_error_callback = sub { +# my ($cgi, $deploy_zone) = @_; +# my @blocknums = grep { +# /^blocknum\d+/ and length($cgi->param($_.'_censusblock')) +# } $cgi->param; +# +# sort { $a->censusblock <=> $b->censusblock } +# map { +# my $k = $_; +# FS::deploy_zone_block->new({ +# blocknum => scalar($cgi->param($k)), +# zonenum => $deploy_zone->zonenum, +# censusblock => scalar($cgi->param($k.'_censusblock')), +# censusyear => scalar($cgi->param($k.'_censusyear')), +# }) +# } @blocknums; +#};