summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/deploy_zone-mobile.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-09-30 22:49:38 -0700
committerMark Wells <mark@freeside.biz>2015-09-30 22:49:38 -0700
commitd07c72046444319e0811c6a00b504885da091992 (patch)
tree145b723189b757087d9984eafb96413ab994061c /httemplate/edit/process/deploy_zone-mobile.html
parent21b519eb5313ebe09242a2d90e1e615c56c64739 (diff)
graphical selection of deployment zones and automatic block lookup, #30260
Diffstat (limited to 'httemplate/edit/process/deploy_zone-mobile.html')
-rw-r--r--httemplate/edit/process/deploy_zone-mobile.html19
1 files changed, 18 insertions, 1 deletions
diff --git a/httemplate/edit/process/deploy_zone-mobile.html b/httemplate/edit/process/deploy_zone-mobile.html
index 7b8f911ec..d36d5d448 100644
--- a/httemplate/edit/process/deploy_zone-mobile.html
+++ b/httemplate/edit/process/deploy_zone-mobile.html
@@ -2,8 +2,25 @@
error_redirect => popurl(2).'deploy_zone-mobile.html',
table => 'deploy_zone',
viewall_dir => 'browse',
- process_o2m =>
+ precheck_callback => $precheck_callback,
+ process_o2m =>
{ 'table' => 'deploy_zone_vertex',
'fields' => [qw( latitude longitude )]
},
&>
+<%init>
+my $precheck_callback = sub {
+ # convert the vertex list into a process_o2m-style parameter list
+ if ( $cgi->param('vertices') ) {
+ my $vertices = decode_json($cgi->param('vertices'));
+ my $i = 0;
+ foreach (@$vertices) {
+ $cgi->param("vertexnum${i}", '');
+ $cgi->param("vertexnum${i}_latitude", $_->[0]);
+ $cgi->param("vertexnum${i}_longitude", $_->[1]);
+ $i++;
+ }
+ }
+ '';
+};
+</%init>