[freeside-commits] freeside/httemplate/elements location.html, 1.18, 1.19 tr-select-cust_location.html, 1.21, 1.22 city.html, 1.6, 1.7 tr-coords.html, NONE, 1.1 popup_link.html, 1.10, 1.11 coord-links.html, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Mon Dec 12 21:09:33 PST 2011


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv14835/httemplate/elements

Modified Files:
	location.html tr-select-cust_location.html city.html 
	popup_link.html 
Added Files:
	tr-coords.html coord-links.html 
Log Message:
add latitude/longitude to prospects, customers and package locations, RT#15539

Index: tr-select-cust_location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-select-cust_location.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -w -d -r1.21 -r1.22
--- tr-select-cust_location.html	27 May 2011 05:56:42 -0000	1.21
+++ tr-select-cust_location.html	13 Dec 2011 05:09:31 -0000	1.22
@@ -270,7 +270,9 @@
 my $editable = $cust_main ? 0 : 1; #could use explicit control
 my $addnew = $cust_main ? 1 : ( $locationnum>0 ? 0 : 1 );
 
-my @location_fields = qw( address1 address2 city county state zip country );
+my @location_fields = qw( address1 address2 city county state zip country
+                          latitude longitude
+                        );
 if ( $opt{'alt_format'} ) {
     push @location_fields, qw( location_type location_number location_kind );
 }

--- NEW FILE: tr-coords.html ---
<TR>
  <TD ALIGN="right"><% mt('Latitude') |h %></TD>
  <TD COLSPAN=5>
    <FONT STYLE="background-color: #ffffff; border: 1px solid #ffffff"><% $latitude %></FONT>
    &nbsp;<% mt('Longitude') |h %>
    <FONT STYLE="background-color: #ffffff; border: 1px solid #ffffff"><% $longitude %></FONT>
    <& /elements/coord-links.html, $latitude, $longitude, $name &>
  </TD>
</TR>
<%init>

my ($latitude, $longitude, $name) = @_;

</%init>

--- NEW FILE: coord-links.html ---
<& /elements/init_overlib.html &>

<& /elements/popup_link.html,
     'action'      => $p. 'view/map.html?'. $query,
     'label'       => mt('map'),
     'actionlabel' => $name,
     'width'       => 763,
     'height'      => 575,
     #'color'
&>

<A HREF="<%$p%>view/kml.cgi?<% $query %>"><% mt('earth') |h %></A>

<%init>

my ($latitude, $longitude, $name) = @_;

my $query = 'name='. uri_escape($name).
            ';lat='. $latitude.
            ';lon='. $longitude;

</%init>

Index: location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/location.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -w -d -r1.18 -r1.19
--- location.html	27 May 2011 05:56:42 -0000	1.18
+++ location.html	13 Dec 2011 05:09:31 -0000	1.19
@@ -149,7 +149,7 @@
 
 <TR>
   <<%$th%> ALIGN="right"><%$r%><% mt('City') |h %></<%$th%>>
-  <TD WIDTH="1"><% include('/elements/city.html', %select_hash) %></TD>
+  <TD WIDTH="1"><% include('/elements/city.html', %select_hash, 'text_style' => \@style ) %></TD>
   <<%$th%> ALIGN="right" WIDTH="1" ID="<%$pre%>countylabel" <%$county_style%>><%$r%>County</<%$th%>>
   <TD WIDTH="1"><% include('/elements/select-county.html', %select_hash ) %></TD>
   <<%$th%> ALIGN="right" WIDTH="1"><%$r%><% mt('State') |h %></<%$th%>>
@@ -175,6 +175,28 @@
   <TD COLSPAN=6><% include('/elements/select-country.html', %select_hash ) %></TD>
 </TR>
 
+<TR>
+  <TD ALIGN="right"><% mt('Latitude') |h %></TH>
+  <TD COLSPAN=7>
+    <INPUT TYPE  = "text"
+           NAME  = "<%$pre%>latitude"
+           ID    = "<%$pre%>latitude"
+           VALUE = "<% $object->get($pre.'latitude') |h %>"
+           <% $disabled %>
+           <% $style %>
+    >
+    <% mt('Longitude') |h %>
+    <INPUT TYPE  = "text"
+           NAME  = "<%$pre%>longitude"
+           ID    = "<%$pre%>longitude"
+           VALUE = "<% $object->get($pre.'longitude') |h %>"
+           <% $disabled %>
+           <% $style %>
+    >
+  </TD>
+</TR>
+<INPUT TYPE="hidden" NAME="<%$pre%>coord_auto" VALUE="<% $object->get($pre.'coord_auto') %>">
+
 % if ( !$pre ) { 
   <INPUT TYPE="hidden" NAME="geocode" VALUE="<% $opt{geocode} %>">
 % } else {

Index: city.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/city.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- city.html	13 Aug 2010 23:55:56 -0000	1.6
+++ city.html	13 Dec 2011 05:09:31 -0000	1.7
@@ -123,6 +123,9 @@
 my $text_style   = $opt{'style'} ? [ @{ $opt{'style'} } ] : [];
 my $select_style = $opt{'style'} ? [ @{ $opt{'style'} } ] : [];
 
+push @$text_style,   @{ $opt{'text_style'} }   if $opt{'text_style'};
+push @$select_style, @{ $opt{'select_style'} } if $opt{'select_style'};
+
 my @cities = cities( $opt{'county'}, $opt{'state'}, $opt{'country'} );
 my $saved_city = '';
 if ( scalar(@cities) > 1 || $cities[0] ) {

Index: popup_link.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/popup_link.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- popup_link.html	17 Oct 2010 22:35:57 -0000	1.10
+++ popup_link.html	13 Dec 2011 05:09:31 -0000	1.11
@@ -46,6 +46,7 @@
 }
 
 my $label = $params->{'label'};
+$label =~ s/ /&nbsp;/g;
 my $onclick = include('/elements/popup_link_onclick.html', $params);
 
 </%init>



More information about the freeside-commits mailing list