Check if enable_counties is turned on.
If it is off then take care of the member info edit screen with hidden
field.
If it is on then show the setting tab for counties.
<input type="hidden" name="option" value="addNew">
<input type="hidden" name="create_time" value="now">
{/if}
-
+ {if !$settings.enable_counties}
+ <input type="hidden" name="county" value="0">
+ {/if}
<table class="glm-admin-table">
<tr>
<th>{$terms.term_member_cap} Name:</th>
{if $memberInfo.fieldFail.state}<p>{$memberInfo.fieldFail.state}</p>{/if}
</td>
</tr>
+ {if $settings.enable_counties}
<tr>
- <th {if $memberInfo.fieldRequired.county}class="glm-required"{/if}>County:</th>
+ <th {if $memberInfo.fieldRequired.county}class="glm-required"{/if}>{$terms.term_county_cap}:</th>
<td {if $memberInfo.fieldFail.county}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
<select name="county">
{foreach from=$memberInfo.fieldData.county.list item=v}
{if $memberInfo.fieldFail.county}<p>{$memberInfo.fieldFail.county}</p>{/if}
</td>
</tr>
+ {/if}
<tr>
<th {if $memberInfo.fieldRequired.region}class="glm-required"{/if}>Region:</th>
<td {if $memberInfo.fieldFail.region}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-settings&glm_action=cities">Click here to add Cities.</a></td>
</tr>
{/if}
- {if !$haveCounties}
+ {if !$haveCounties && $settings.enable_counties}
<tr>
<th><span class="glm-error">You do not have any {$terms.term_county_plur} setup.</span></th>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-settings&glm_action=counties">Click here to add {$terms.term_county_plur_cap}.</a></td>
<a href="{$thisUrl}?page={$thisPage}&glm_action=cities" class="nav-tab{if $thisAction==cities} nav-tab-active{/if}">Cities</a>
{if $enable_members}
<a href="{$thisUrl}?page={$thisPage}&glm_action=regions" class="nav-tab{if $thisAction==regions} nav-tab-active{/if}">Regions</a>
- <a href="{$thisUrl}?page={$thisPage}&glm_action=counties" class="nav-tab{if $thisAction==counties} nav-tab-active{/if}">{$terms.term_admin_menu_configure_counties}</a>
+
+ {if $settings.enable_counties}
+ <a href="{$thisUrl}?page={$thisPage}&glm_action=counties" class="nav-tab{if $thisAction==counties} nav-tab-active{/if}">{$terms.term_admin_menu_configure_counties}</a>
+ {/if}
{/if}
{foreach $addOnTabs as $a}
<a href="{$thisUrl}?page={$thisPage}&glm_action={$a.action}" class="nav-tab{if $thisAction==$a.action} nav-tab-active{/if}">{$a.text}</a>