summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Brelsfoard <alex@freeside.biz>2015-02-10 00:10:00 -0500
committerJonathan Prykop <jonathan@freeside.biz>2015-07-02 23:42:53 -0500
commitfa8a42b29c19f9cb692f409e6ac3d081010ec3f8 (patch)
treeebb4e1499c618362f92f69d4f9a7ed6e3addda65
parentca8b9c43d93fce9dc821e03f9126ad47f4c1b016 (diff)
RT #29285 adding new config to disable city requirement
-rw-r--r--FS/FS/Conf.pm8
-rw-r--r--httemplate/elements/location.html5
2 files changed, 13 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 5ea3555e7..fa612c065 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3397,6 +3397,14 @@ and customer address. Include units.',
},
{
+ 'key' => 'city_not_required',
+ 'section' => 'required',
+ 'description' => 'Turn off requirement for a City to be entered for billing & shipping addresses',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ },
+
+ {
'key' => 'echeck-void',
'section' => 'deprecated',
'description' => '<B>DEPRECATED</B>, now controlled by ACLs. Used to enable local-only voiding of echeck payments in addition to refunds against the payment gateway',
diff --git a/httemplate/elements/location.html b/httemplate/elements/location.html
index 214a7d5f2..357a91db7 100644
--- a/httemplate/elements/location.html
+++ b/httemplate/elements/location.html
@@ -169,10 +169,15 @@ Example:
<TR>
+% if ($conf->exists('city_not_required')) {
+<input type="hidden" name="<% ($select_hash{'prefix'}) ? $select_hash{'prefix'} : '' %>city" value=" "/>
+%} else {
<<%$th%> ALIGN="right"><%$r%><% mt('City') |h %></<%$th%>>
<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%>>
<TD WIDTH="1">
<% include('/elements/select-state.html', %select_hash ) %>