blob: b3c8b31ea384c0d2cd7de8e4e9709778f2d39a14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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>
|