diff options
| author | Mark Wells <mark@freeside.biz> | 2014-08-07 13:50:51 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2014-08-07 14:01:29 -0700 |
| commit | 022bfd91eca7ae26f8f6ee125179f5c0ff4cbb72 (patch) | |
| tree | cc0393376e66d513fb9470e4ce946b7142241088 /httemplate/elements/deploy_zone_vertex.html | |
| parent | 36d3a1f27ef9c801f4fb9a0189bde93f417e1a88 (diff) | |
merge new form 477 stuff, #24047
Diffstat (limited to 'httemplate/elements/deploy_zone_vertex.html')
| -rw-r--r-- | httemplate/elements/deploy_zone_vertex.html | 45 |
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 + <INPUT TYPE = "text" + NAME = "<%$name%>_latitude" + ID = "<%$id%>_latitude" + VALUE = "<% scalar($cgi->param($name.'_latitude')) + || $deploy_zone_vertex->latitude + %>" + SIZE = 18 + <% $onchange %> + > + + Longitude + <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> |
