summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-08-06 14:11:01 -0700
committerMark Wells <mark@freeside.biz>2014-08-06 14:11:01 -0700
commit1ebcca94aba75c5901c6eefaf373f39e94b03cf0 (patch)
treea6f0833c23777e2924e4669e7527f2c9a312bf44 /httemplate/elements
parentd7cf0d6bb3b81b1c91ef1bcc3252d56f96b65b0f (diff)
477 report: mobile deployment info
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/deploy_zone_vertex.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/httemplate/elements/deploy_zone_vertex.html b/httemplate/elements/deploy_zone_vertex.html
new file mode 100644
index 000000000..b3c8b31ea
--- /dev/null
+++ b/httemplate/elements/deploy_zone_vertex.html
@@ -0,0 +1,45 @@
+% unless ( $opt{'js_only'} ) {
+
+ <INPUT TYPE="hidden" NAME="<%$name%>" ID="<%$id%>" VALUE="<% $curr_value %>">
+ Latitude&nbsp;
+ <INPUT TYPE = "text"
+ NAME = "<%$name%>_latitude"
+ ID = "<%$id%>_latitude"
+ VALUE = "<% scalar($cgi->param($name.'_latitude'))
+ || $deploy_zone_vertex->latitude
+ %>"
+ SIZE = 18
+ <% $onchange %>
+ >
+ &nbsp;
+ Longitude&nbsp;
+ <INPUT TYPE = "text"
+ NAME = "<%$name%>_longitude"
+ ID = "<%$id%>_longitude"
+ VALUE = "<% scalar($cgi->param($name.'_longitude'))
+ || $deploy_zone_vertex->longitude
+ %>"
+ SIZE = 18
+ <% $onchange %>
+ >
+% }
+<%init>
+
+my( %opt ) = @_;
+
+my $name = $opt{'element_name'} || $opt{'field'} || 'vertexnum';
+my $id = $opt{'id'} || 'vertexnum';
+
+my $curr_value = $opt{'curr_value'} || $opt{'value'};
+
+my $onchange = $opt{'onchange'};
+if ( $onchange ) {
+ $onchange =~ s/\(what\);/(this);/;
+ $onchange = 'onchange="'.$onchange.'"';
+}
+
+my $deploy_zone_vertex = $curr_value
+ ? FS::deploy_zone_vertex->by_key($curr_value)
+ : FS::deploy_zone_vertex->new;
+
+</%init>