1 <& elements/process.html,
2 error_redirect => popurl(2).'deploy_zone-mobile.html',
3 table => 'deploy_zone',
4 viewall_dir => 'browse',
5 precheck_callback => $precheck_callback,
7 { 'table' => 'deploy_zone_vertex',
8 'fields' => [qw( latitude longitude )]
12 my $precheck_callback = sub {
13 # convert the vertex list into a process_o2m-style parameter list
14 if ( $cgi->param('vertices') ) {
15 my $vertices = decode_json($cgi->param('vertices'));
17 foreach (@$vertices) {
18 $cgi->param("vertexnum${i}", '');
19 $cgi->param("vertexnum${i}_latitude", $_->[0]);
20 $cgi->param("vertexnum${i}_longitude", $_->[1]);