From 7acc76e0ead0d88cb225c88016c778c8feb9a075 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sun, 26 Aug 2012 23:05:04 -0700 Subject: [PATCH] only show coordinate fields where necessary, #940 --- httemplate/edit/cust_main.cgi | 2 ++ httemplate/elements/location.html | 8 ++++++++ httemplate/elements/tr-select-cust_location.html | 1 + httemplate/misc/payment.cgi | 6 +++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 9b30d31b0..e3e812f19 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -53,6 +53,7 @@ <& /elements/location.html, object => $cust_main->bill_location, prefix => 'bill_', + enable_coords => 1, &> <& cust_main/after_bill_location.html, $cust_main &> @@ -77,6 +78,7 @@ prefix => 'ship_', enable_censustract => 1, enable_district => 1, + enable_coords => 1, &> 0, #set true to disable the red asterisks next #to required fields 'address1_label' => 'Address', #label for address + 'enable_coords' => 1, #show latitude/longitude fields 'enable_district' => 1, #show tax district field 'enable_censustract' => 1, #show censustract field + ) @@ -175,6 +177,7 @@ Example: +% if ( $opt{enable_coords} ) { +% } else { +% foreach (qw(latitude longitude)) { + +% } +% } diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html index d9e3e9e27..b804f4548 100644 --- a/httemplate/elements/tr-select-cust_location.html +++ b/httemplate/elements/tr-select-cust_location.html @@ -216,6 +216,7 @@ Example: 'no_asterisks' => 1, 'no_bold' => $opt{'no_bold'}, 'alt_format' => $opt{'alt_format'}, + 'enable_coords'=> 1, ) %>
<% include('/elements/select-country.html', %select_hash ) %>
<% mt('Latitude') |h %> @@ -195,6 +198,11 @@ Example: >