-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mandatory star not visible on address on company.
- Loading branch information
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{* | ||
* 2007-2014 PrestaShop | ||
* 2007-2017 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -18,7 +18,7 @@ | |
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <[email protected]> | ||
* @copyright 2007-2014 PrestaShop SA | ||
* @copyright 2007-2017 PrestaShop SA | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*} | ||
|
@@ -27,7 +27,7 @@ | |
<h1 class="page-subheading">{l s='Your addresses'}</h1> | ||
<p class="info-title"> | ||
{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))} | ||
{l s='Modify address'} | ||
{l s='Modify address'} | ||
{if isset($smarty.post.alias)} | ||
"{$smarty.post.alias}" | ||
{else} | ||
|
@@ -50,15 +50,15 @@ | |
{foreach from=$ordered_adr_fields item=field_name} | ||
{if $field_name eq 'company'} | ||
<div class="form-group"> | ||
<label for="company">{l s='Company'}</label> | ||
<label for="company">{l s='Company'}{if isset($required_fields) && in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label> | ||
<input class="form-control validate" data-validate="{$address_validation.$field_name.validate}" type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{/if} | ||
{if $field_name eq 'vat_number'} | ||
<div id="vat_area"> | ||
<div id="vat_number"> | ||
<div class="form-group"> | ||
<label for="vat-number">{l s='VAT number'}</label> | ||
<label for="vat-number">{l s='VAT number'}{if isset($required_fields) && in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label> | ||
<input type="text" class="form-control validate" data-validate="{$address_validation.$field_name.validate}" id="vat-number" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
</div> | ||
|
@@ -92,7 +92,7 @@ | |
{/if} | ||
{if $field_name eq 'address2'} | ||
<div class="required form-group"> | ||
<label for="address2">{l s='Address (Line 2)'}</label> | ||
<label for="address2">{l s='Address (Line 2)'}{if isset($required_fields) && in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label> | ||
<input class="validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="address2" name="address2" value="{if isset($smarty.post.address2)}{$smarty.post.address2}{else}{if isset($address->address2)}{$address->address2|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{/if} | ||
|
@@ -110,7 +110,7 @@ | |
</div> | ||
{* if customer hasn't update his layout address, country has to be verified but it's deprecated *} | ||
{/if} | ||
{if $field_name eq 'Country:name' || $field_name eq 'country'} | ||
{if $field_name eq 'Country:name' || $field_name eq 'country' || $field_name eq 'Country:iso_code'} | ||
<div class="required form-group"> | ||
<label for="id_country">{l s='Country'} <sup>*</sup></label> | ||
<select id="id_country" class="form-control" name="id_country">{$countries_list}</select> | ||
|
@@ -131,10 +131,6 @@ | |
<label for="phone">{l s='Home phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>**</sup>{/if}</label> | ||
<input class="{if isset($one_phone_at_least) && $one_phone_at_least}is_required{/if} validate form-control" data-validate="{$address_validation.phone.validate}" type="tel" id="phone" name="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{else}{if isset($address->phone)}{$address->phone|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{if isset($one_phone_at_least) && $one_phone_at_least} | ||
{assign var="atLeastOneExists" value=true} | ||
<p class="inline-infos required">** {l s='You must register at least one phone number.'}</p> | ||
{/if} | ||
<div class="clearfix"></div> | ||
{/if} | ||
{if $field_name eq 'phone_mobile'} | ||
|
@@ -144,13 +140,17 @@ | |
<input class="validate form-control" data-validate="{$address_validation.phone_mobile.validate}" type="tel" id="phone_mobile" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{if isset($address->phone_mobile)}{$address->phone_mobile|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{/if} | ||
{if ($field_name eq 'phone_mobile') || ($field_name eq 'phone_mobile') && !isset($atLeastOneExists) && isset($one_phone_at_least) && $one_phone_at_least} | ||
{assign var="atLeastOneExists" value=true} | ||
<p class="inline-infos required">** {l s='You must register at least one phone number.'}</p> | ||
{/if} | ||
{/foreach} | ||
{if !$postCodeExist} | ||
<div class="required postcode form-group unvisible"> | ||
<label for="postcode">{l s='Zip/Postal Code'} <sup>*</sup></label> | ||
<input class="is_required validate form-control" data-validate="{$address_validation.postcode.validate}" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{/if} | ||
{/if} | ||
{if !$stateExist} | ||
<div class="required id_state form-group unvisible"> | ||
<label for="id_state">{l s='State'} <sup>*</sup></label> | ||
|
@@ -176,26 +176,26 @@ | |
<input class="{if isset($one_phone_at_least) && $one_phone_at_least}is_required{/if} validate form-control" data-validate="{$address_validation.phone.validate}" type="tel" id="phone" name="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{else}{if isset($address->phone)}{$address->phone|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{/if} | ||
{if isset($one_phone_at_least) && $one_phone_at_least && !$atLeastOneExists} | ||
<p class="inline-infos required">{l s='You must register at least one phone number.'}</p> | ||
{/if} | ||
<div class="clearfix"></div> | ||
{if !$mobilePhoneExist} | ||
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group"> | ||
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>**</sup>{/if}</label> | ||
<input class="validate form-control" data-validate="{$address_validation.phone_mobile.validate}" type="tel" id="phone_mobile" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{if isset($address->phone_mobile)}{$address->phone_mobile|escape:'html':'UTF-8'}{/if}{/if}" /> | ||
</div> | ||
{/if} | ||
{if isset($one_phone_at_least) && $one_phone_at_least && !$atLeastOneExists} | ||
<p class="inline-infos required">{l s='You must register at least one phone number.'}</p> | ||
{/if} | ||
<div class="required form-group" id="adress_alias"> | ||
<label for="alias">{l s='Please assign an address title for future reference.'} <sup>*</sup></label> | ||
<input type="text" id="alias" class="is_required validate form-control" data-validate="{$address_validation.alias.validate}" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else if isset($address->alias)}{$address->alias|escape:'html':'UTF-8'}{elseif !$select_address}{l s='My address'}{/if}" /> | ||
<input type="text" id="alias" class="is_required validate form-control" data-validate="{$address_validation.alias.validate}" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{elseif isset($address->alias)}{$address->alias|escape:'html':'UTF-8'}{elseif !$select_address}{l s='My address'}{/if}" /> | ||
</div> | ||
<p class="submit2"> | ||
{if isset($id_address)}<input type="hidden" name="id_address" value="{$id_address|intval}" />{/if} | ||
{if isset($back)}<input type="hidden" name="back" value="{$back}" />{/if} | ||
{if isset($mod)}<input type="hidden" name="mod" value="{$mod}" />{/if} | ||
{if isset($select_address)}<input type="hidden" name="select_address" value="{$select_address|intval}" />{/if} | ||
<input type="hidden" name="token" value="{$token}" /> | ||
<input type="hidden" name="token" value="{$token}" /> | ||
<button type="submit" name="submitAddress" id="submitAddress" class="btn btn-default button button-medium"> | ||
<span> | ||
{l s='Save'} | ||
|
@@ -215,14 +215,14 @@ | |
{strip} | ||
{if isset($smarty.post.id_state) && $smarty.post.id_state} | ||
{addJsDef idSelectedState=$smarty.post.id_state|intval} | ||
{else if isset($address->id_state) && $address->id_state} | ||
{elseif isset($address->id_state) && $address->id_state} | ||
{addJsDef idSelectedState=$address->id_state|intval} | ||
{else} | ||
{addJsDef idSelectedState=false} | ||
{/if} | ||
{if isset($smarty.post.id_country) && $smarty.post.id_country} | ||
{addJsDef idSelectedCountry=$smarty.post.id_country|intval} | ||
{else if isset($address->id_country) && $address->id_country} | ||
{elseif isset($address->id_country) && $address->id_country} | ||
{addJsDef idSelectedCountry=$address->id_country|intval} | ||
{else} | ||
{addJsDef idSelectedCountry=false} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{* | ||
* 2007-2014 PrestaShop | ||
* 2007-2017 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -18,7 +18,7 @@ | |
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <[email protected]> | ||
* @copyright 2007-2014 PrestaShop SA | ||
* @copyright 2007-2017 PrestaShop SA | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*} | ||
|
@@ -47,10 +47,10 @@ | |
{/foreach} | ||
<li class="address_update"> | ||
<a class="btn btn-default button button-small" href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}")|escape:'html':'UTF-8'}" title="{l s='Update'}"><span>{l s='Update'}<i class="icon-chevron-right right"></i></span></a> | ||
<a class="btn btn-default button button-small" href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}&delete")|escape:'html':'UTF-8'}" onclick="return confirm('{l s='Are you sure?' js=1}');" title="{l s='Delete'}"><span>{l s='Delete'}<i class="icon-remove right"></i></span></a></li> | ||
<a class="btn btn-default button button-small" href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}&delete")|escape:'html':'UTF-8'}" data-id="addresses_confirm" title="{l s='Delete'}"><span>{l s='Delete'}<i class="icon-remove right"></i></span></a></li> | ||
</ul> | ||
</div> | ||
{if $smarty.foreach.myLoop.index % 2 && !$smarty.foreach.myLoop.last} | ||
{if $smarty.foreach.myLoop.index % 2 && !$smarty.foreach.myLoop.last} | ||
</div> | ||
<div class="bloc_adresses row"> | ||
{/if} | ||
|
@@ -64,6 +64,7 @@ | |
<a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='Add an address'}" class="btn btn-default button button-medium"><span>{l s='Add a new address'}<i class="icon-chevron-right right"></i></span></a> | ||
</div> | ||
<ul class="footer_links clearfix"> | ||
<li><a class="btn btn-defaul button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"><span><i class="icon-chevron-left"></i> {l s='Back to your account'}</span></a></li> | ||
<li><a class="btn btn-defaul button button-small" href="{$base_dir}"><span><i class="icon-chevron-left"></i> {l s='Home'}</span></a></li> | ||
</ul> | ||
<li><a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"><span><i class="icon-chevron-left"></i> {l s='Back to your account'}</span></a></li> | ||
<li><a class="btn btn-default button button-small" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}"><span><i class="icon-chevron-left"></i> {l s='Home'}</span></a></li> | ||
</ul> | ||
{addJsDefL name=addressesConfirm}{l s='Are you sure?' js=1}{/addJsDefL} |