[-] FO : Fix bug #PSCFV-8412 no zipcode for countries when default country has no zip code in adress format

This commit is contained in:
gRoussac
2013-06-25 16:17:58 +02:00
parent 4627768092
commit 699053da27
7 changed files with 70 additions and 13 deletions
+10 -2
View File
@@ -106,6 +106,7 @@ $(document).ready(function() {
</div>
</div>
{assign var="stateExist" value="false"}
{assign var="postCodeExist" value="false"}
{foreach from=$ordered_adr_fields item=field_name}
{if $field_name eq 'company'}
<div class="text">
@@ -139,6 +140,7 @@ $(document).ready(function() {
</div>
{/if}
{if $field_name eq 'postcode'}
{assign var="postCodeExist" value="true"}
<div class="required postcode text">
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
<input type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'htmlall':'UTF-8'}{/if}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
@@ -192,14 +194,20 @@ $(document).ready(function() {
</div>
{/if}
{/foreach}
{if $postCodeExist eq "false"}
<div class="required postcode text hidden">
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
<input type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'htmlall':'UTF-8'}{/if}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
</div>
{/if}
{if $stateExist eq "false"}
<div class="required id_state select">
<div class="required id_state select hidden">
<label for="id_state">{l s='State'} <sup>*</sup></label>
<select name="id_state" id="id_state">
<option value="">-</option>
</select>
</div>
{/if}
{/if}
<div class="textarea">
<label for="other">{l s='Additional information'}</label>
<textarea id="other" name="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{else}{if isset($address->other)}{$address->other|escape:'htmlall':'UTF-8'}{/if}{/if}</textarea>
@@ -132,6 +132,7 @@
<span class="inline-infos">{l s='Apartment, suite, unit, building, floor, etc...'}</span>
</p>
{elseif $field_name eq "postcode"}
{assign var='postCodeExist' value=true}
<p class="required postcode text">
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
<input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
@@ -165,14 +166,20 @@
</p>
{/if}
{/foreach}
{if $postCodeExist eq false}
<p class="required postcode text hidden">
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
<input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
</p>
{/if}
{if $stateExist eq false}
<p class="required id_state select">
<p class="required id_state select hidden">
<label for="id_state">{l s='State'} <sup>*</sup></label>
<select name="id_state" id="id_state">
<option value="">-</option>
</select>
</p>
{/if}
{/if}
<p class="textarea">
<label for="other">{l s='Additional information'}</label>
<textarea name="other" id="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{/if}</textarea>
+1
View File
@@ -71,6 +71,7 @@ $(document).ready(function() {
</script>
{assign var='stateExist' value=false}
{assign var='postCodeExist' value=false}
{if !isset($email_create)}
{include file="./authentication-choice.tpl"}
{else}