[*] FO : DNI can be not required
This commit is contained in:
@@ -99,6 +99,7 @@ class AddressFormatCore extends ObjectModel
|
||||
'outstanding_allow_amount',
|
||||
'call_prefix',
|
||||
'definition',
|
||||
'debug_list'
|
||||
);
|
||||
|
||||
public static $forbiddenClassList = array(
|
||||
|
||||
@@ -89,14 +89,18 @@ $(function(){ldelim}
|
||||
<form action="{$link->getPageLink('address', true)|escape:'html'}" method="post" class="std" id="add_address">
|
||||
<fieldset>
|
||||
<h3>{if isset($id_address)}{l s='Your address'}{else}{l s='New address'}{/if}</h3>
|
||||
<p class="required text dni">
|
||||
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
|
||||
{assign var="stateExist" value=false}
|
||||
{assign var="postCodeExist" value=false}
|
||||
{assign var="dniExist" value=false}
|
||||
{foreach from=$ordered_adr_fields item=field_name}
|
||||
{if $field_name eq 'dni'}
|
||||
{assign var="dniExist" value=true}
|
||||
<p class="text">
|
||||
<label for="dni">{l s='Identification number'}</label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{else}{if isset($address->dni)}{$address->dni|escape:'html'}{/if}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{assign var="stateExist" value=false}
|
||||
{assign var="postCodeExist" value=false}
|
||||
{foreach from=$ordered_adr_fields item=field_name}
|
||||
{/if}
|
||||
{if $field_name eq 'company'}
|
||||
<p class="text">
|
||||
<label for="company">{l s='Company'}</label>
|
||||
@@ -210,6 +214,13 @@ $(function(){ldelim}
|
||||
</select>
|
||||
</p>
|
||||
{/if}
|
||||
{if !$dniExist}
|
||||
<p class="required text dni">
|
||||
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{else}{if isset($address->dni)}{$address->dni|escape:'html'}{/if}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{/if}
|
||||
<p 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:'html'}{/if}{/if}</textarea>
|
||||
|
||||
@@ -90,6 +90,7 @@ $(document).ready(function() {
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
{assign var='stateExist' value=false}
|
||||
{assign var="postCodeExist" value=false}
|
||||
{assign var="dniExist" value=false}
|
||||
{if !isset($email_create)}
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
@@ -315,7 +316,9 @@ $(document).ready(function() {
|
||||
<input type="text" class="text" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{/if}" />
|
||||
</p>
|
||||
</div>
|
||||
<p class="required text dni">
|
||||
{elseif $field_name eq "dni"}
|
||||
{assign var='dniExist' value=true}
|
||||
<p class="text">
|
||||
<label for="dni">{l s='Identification number'}</label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
@@ -359,6 +362,12 @@ $(document).ready(function() {
|
||||
</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}" onblur="$('#postcode').val($('#postcode').val().toUpperCase());" />
|
||||
</p>
|
||||
{/if}
|
||||
{if $stateExist eq false}
|
||||
<p class="required id_state select hidden">
|
||||
<label for="id_state">{l s='State'} <sup>*</sup></label>
|
||||
@@ -367,11 +376,12 @@ $(document).ready(function() {
|
||||
</select>
|
||||
</p>
|
||||
{/if}
|
||||
{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}" onblur="$('#postcode').val($('#postcode').val().toUpperCase());" />
|
||||
</p>
|
||||
{if $dniExist eq false}
|
||||
<p class="required text dni">
|
||||
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{/if}
|
||||
<p class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}text">
|
||||
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
|
||||
@@ -386,6 +396,7 @@ $(document).ready(function() {
|
||||
<div id="opc_invoice_address" class="hidden">
|
||||
{assign var=stateExist value=false}
|
||||
{assign var=postCodeExist value=false}
|
||||
{assign var=dniExist value=false}
|
||||
<h3>{l s='Invoice address'}</h3>
|
||||
{foreach from=$inv_all_fields item=field_name}
|
||||
{if $field_name eq "company" && $b2b_enable}
|
||||
@@ -400,8 +411,10 @@ $(document).ready(function() {
|
||||
<input type="text" class="text" id="vat_number_invoice" name="vat_number_invoice" value="{if isset($smarty.post.vat_number_invoice)}{$smarty.post.vat_number_invoice}{/if}" />
|
||||
</p>
|
||||
</div>
|
||||
<p class="required text dni_invoice">
|
||||
<label for="dni">{l s='Identification number'}</label>
|
||||
{elseif $field_name eq "dni"}
|
||||
{assign var=dniExist value=true}
|
||||
<p class="text">
|
||||
<label for="dni_invoice">{l s='Identification number'}</label>
|
||||
<input type="text" class="text" name="dni_invoice" id="dni_invoice" value="{if isset($smarty.post.dni_invoice)}{$smarty.post.dni_invoice}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
@@ -465,6 +478,13 @@ $(document).ready(function() {
|
||||
</select>
|
||||
</p>
|
||||
{/if}
|
||||
{if !$dniExist}
|
||||
<p class="required text dni_invoice">
|
||||
<label for="dni_invoice">{l s='Identification number'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="dni_invoice" id="dni_invoice" value="{if isset($smarty.post.dni_invoice)}{$smarty.post.dni_invoice}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{/if}
|
||||
<p class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}text">
|
||||
<label for="phone_mobile_invoice">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
|
||||
<input type="text" class="text" name="phone_mobile_invoice" id="phone_mobile_invoice" value="{if isset($smarty.post.phone_mobile_invoice)}{$smarty.post.phone_mobile_invoice}{/if}" />
|
||||
|
||||
@@ -182,12 +182,27 @@
|
||||
<h3>{l s='Delivery address'}</h3>
|
||||
{$stateExist = false}
|
||||
{$postCodeExist = false}
|
||||
{$dniExist = false}
|
||||
{foreach from=$dlv_all_fields item=field_name}
|
||||
{if $field_name eq "company" && $b2b_enable}
|
||||
<p class="text">
|
||||
<label for="company">{l s='Company'}</label>
|
||||
<input type="text" class="text" id="company" name="company" value="{if isset($guestInformations) && $guestInformations.company}{$guestInformations.company}{/if}" />
|
||||
</p>
|
||||
{elseif $field_name eq "vat_number"}
|
||||
<div id="vat_number_block" style="display:none;">
|
||||
<p class="text">
|
||||
<label for="company">{l s='Company'}</label>
|
||||
<input type="text" class="text" id="company" name="company" value="{if isset($guestInformations) && $guestInformations.company}{$guestInformations.company}{/if}" />
|
||||
<label for="vat_number">{l s='VAT number'}</label>
|
||||
<input type="text" class="text" name="vat_number" id="vat_number" value="{if isset($guestInformations) && $guestInformations.vat_number}{$guestInformations.vat_number}{/if}" />
|
||||
</p>
|
||||
</div>
|
||||
{elseif $field_name eq "dni"}
|
||||
{assign var='dniExist' value=true}
|
||||
<p class="text">
|
||||
<label for="dni">{l s='Identification number'}</label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($guestInformations) && $guestInformations.dni}{$guestInformations.dni}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{elseif $field_name eq "firstname"}
|
||||
<p class="required text">
|
||||
<label for="firstname">{l s='First name'} <sup>*</sup></label>
|
||||
@@ -228,13 +243,6 @@
|
||||
{/foreach}
|
||||
</select>
|
||||
</p>
|
||||
{elseif $field_name eq "vat_number"}
|
||||
<div id="vat_number_block" style="display:none;">
|
||||
<p class="text">
|
||||
<label for="vat_number">{l s='VAT number'}</label>
|
||||
<input type="text" class="text" name="vat_number" id="vat_number" value="{if isset($guestInformations) && $guestInformations.vat_number}{$guestInformations.vat_number}{/if}" />
|
||||
</p>
|
||||
</div>
|
||||
{elseif $field_name eq "state" || $field_name eq 'State:name'}
|
||||
{$stateExist = true}
|
||||
<p class="required id_state select" style="display:none;">
|
||||
@@ -245,11 +253,6 @@
|
||||
</p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<p class="required text dni">
|
||||
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($guestInformations) && $guestInformations.dni}{$guestInformations.dni}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{if !$postCodeExist}
|
||||
<p class="required postcode text hidden">
|
||||
<label for="postcode">{l s='Zip / Postal code'} <sup>*</sup></label>
|
||||
@@ -263,7 +266,14 @@
|
||||
<option value="">-</option>
|
||||
</select>
|
||||
</p>
|
||||
{/if}
|
||||
{/if}
|
||||
{if !$dniExist}
|
||||
<p class="required text dni">
|
||||
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($guestInformations) && $guestInformations.dni}{$guestInformations.dni}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{/if}
|
||||
<p class="textarea is_customer_param">
|
||||
<label for="other">{l s='Additional information'}</label>
|
||||
<textarea name="other" id="other" cols="26" rows="3"></textarea>
|
||||
@@ -289,6 +299,7 @@
|
||||
<div id="opc_invoice_address" class="is_customer_param">
|
||||
{assign var=stateExist value=false}
|
||||
{assign var=postCodeExist value=false}
|
||||
{assign var=dniExist value=false}
|
||||
<h3>{l s='Invoice address'}</h3>
|
||||
{foreach from=$inv_all_fields item=field_name}
|
||||
{if $field_name eq "company" && $b2b_enable}
|
||||
@@ -303,8 +314,10 @@
|
||||
<input type="text" class="text" id="vat_number_invoice" name="vat_number_invoice" value="" />
|
||||
</p>
|
||||
</div>
|
||||
<p class="required text dni_invoice">
|
||||
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
|
||||
{elseif $field_name eq "dni"}
|
||||
{assign var='dniExist' value=true}
|
||||
<p class="text">
|
||||
<label for="dni_invoice">{l s='Identification number'}</label>
|
||||
<input type="text" class="text" name="dni_invoice" id="dni_invoice" value="{if isset($guestInformations) && $guestInformations.dni_invoice}{$guestInformations.dni_invoice}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
@@ -373,6 +386,13 @@
|
||||
</select>
|
||||
</p>
|
||||
{/if}
|
||||
{if !$dniExist}
|
||||
<p class="required text dni_invoice">
|
||||
<label for="dni_invoice">{l s='Identification number'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="dni_invoice" id="dni_invoice" value="{if isset($guestInformations) && $guestInformations.dni_invoice}{$guestInformations.dni_invoice}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{/if}
|
||||
<p class="textarea is_customer_param">
|
||||
<label for="other_invoice">{l s='Additional information'}</label>
|
||||
<textarea name="other_invoice" id="other_invoice" cols="26" rows="3"></textarea>
|
||||
|
||||
Reference in New Issue
Block a user