adjust checkout

This commit is contained in:
Nolwenn 2016-10-13 13:40:08 +02:00
parent a2ac07f284
commit 4e56b5b618

View File

@ -110,10 +110,7 @@
</div>
</div>
<!-- Account -->
<div class="required form-group col-sm-6">
<label for="guest_email">{l s='Email address'} <sup>*</sup></label>
<input type="text" class="is_required validate form-control" data-validate="isEmail" id="guest_email" name="guest_email" value="{if isset($smarty.post.guest_email)}{$smarty.post.guest_email}{/if}" />
</div>
<div class="required form-group col-sm-6">
<label for="firstname">{l s='First name'} <sup>*</sup></label>
@ -123,11 +120,15 @@
<label for="lastname">{l s='Last name'} <sup>*</sup></label>
<input type="text" class="is_required validate form-control" data-validate="isName" id="lastname" name="lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}" />
</div>
<div class="required form-group col-sm-6">
<label for="guest_email">{l s='Email address'} <sup>*</sup></label>
<input type="text" class="is_required validate form-control" data-validate="isEmail" id="guest_email" name="guest_email" value="{if isset($smarty.post.guest_email)}{$smarty.post.guest_email}{/if}" />
</div>
<div class="form-group date-select col-sm-6">
<label>{l s='Date of Birth'}</label>
<div class="row">
<div class="col-xs-4">
<select id="days" name="days" class="form-control">
<select id="days" name="days" class="form-control custom-input">
<option value="">-</option>
{foreach from=$days item=day}
<option value="{$day}" {if ($sl_day == $day)} selected="selected"{/if}>{$day}&nbsp;&nbsp;</option>
@ -149,7 +150,7 @@
*}
</div>
<div class="col-xs-4">
<select id="months" name="months" class="form-control">
<select id="months" name="months" class="form-control custom-input">
<option value="">-</option>
{foreach from=$months key=k item=month}
<option value="{$k}" {if ($sl_month == $k)} selected="selected"{/if}>{l s=$month}&nbsp;</option>
@ -157,7 +158,7 @@
</select>
</div>
<div class="col-xs-4">
<select id="years" name="years" class="form-control">
<select id="years" name="years" class="form-control custom-input">
<option value="">-</option>
{foreach from=$years item=year}
<option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}&nbsp;&nbsp;</option>
@ -194,26 +195,8 @@
<div class="row">
{foreach from=$dlv_all_fields item=field_name}
{if $field_name eq "company"}
<div class="form-group col-sm-6">
<label for="company">{l s='Company'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>
<input type="text" class="form-control" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{/if}" />
</div>
{elseif $field_name eq "vat_number"}
<div id="vat_number" style="display:none;" class="col-sm-6">
<div class="form-group">
<label for="vat-number">{l s='VAT number'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>
<input id="vat-number" type="text" class="form-control" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{/if}" />
</div>
</div>
{elseif $field_name eq "dni"}
{assign var='dniExist' value=true}
<div class="required dni form-group col-sm-6">
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
<input type="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>
</div>
{elseif $field_name eq "address1"}
{if $field_name eq "address1"}
<div class="required form-group col-sm-6">
<label for="address1">{l s='Address'} <sup>*</sup></label>
<input type="text" class="form-control" name="address1" id="address1" value="{if isset($smarty.post.address1)}{$smarty.post.address1}{/if}" />
@ -225,7 +208,7 @@
</div>
{elseif $field_name eq "postcode"}
{assign var='postCodeExist' value=true}
<div class="required postcode form-group col-sm-6">
<div class="required postcode form-group col-sm-3">
<label for="postcode">{l s='Zip/Postal Code'} <sup>*</sup></label>
<input type="text" class="validate form-control" name="postcode" id="postcode" data-validate="isPostCode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}"/>
</div>
@ -236,28 +219,21 @@
</div>
<!-- if customer hasn't update his layout address, country has to be verified but it's deprecated -->
{elseif $field_name eq "Country:name" || $field_name eq "country"}
<div class="required select form-group col-sm-6">
<div class="required select form-group col-sm-3">
<label for="id_country">{l s='Country'} <sup>*</sup></label>
<select name="id_country" id="id_country" class="form-control">
<select name="id_country" id="id_country" class="form-control custom-input">
{foreach from=$countries item=v}
<option value="{$v.id_country}"{if (isset($smarty.post.id_country) AND $smarty.post.id_country == $v.id_country) OR (!isset($smarty.post.id_country) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name}</option>
{/foreach}
</select>
</div>
{elseif $field_name eq "State:name"}
{assign var='stateExist' value=true}
<div class="required id_state select form-group col-sm-6">
<label for="id_state">{l s='State'} <sup>*</sup></label>
<select name="id_state" id="id_state" class="form-control">
<option value="">-</option>
</select>
</div>
{/if}
{/foreach}
{if $stateExist eq false}
<div class="required id_state select unvisible form-group col-sm-6">
<label for="id_state">{l s='State'} <sup>*</sup></label>
<select name="id_state" id="id_state" class="form-control">
<select name="id_state" id="id_state" class="form-control custom-input">
<option value="">-</option>
</select>
</div>
@ -268,13 +244,7 @@
<input type="text" class="validate form-control" name="postcode" id="postcode" data-validate="isPostCode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}"/>
</div>
{/if}
{if $dniExist eq false}
<div class="required form-group dni col-sm-6">
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
<input type="text" class="text form-control" name="dni" id="dni" value="{if isset($smarty.post.dni) && $smarty.post.dni}{$smarty.post.dni}{/if}" />
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
</div>
{/if}
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group col-sm-6">
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
<input type="text" class="form-control" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
@ -287,7 +257,7 @@
<div class="">
<div class="sm12">
<input type="checkbox" name="invoice_address" id="invoice_address" checked="checked" autocomplete="off" class="custom-input inline"/>
<label for="invoice_address">{l s='Please use another address for invoice'}</label>
<label for="invoice_address">{l s='Use the same address for invoice'}</label>
</div>
</div>
<div id="opc_invoice_address" class="unvisible row">
@ -296,75 +266,57 @@
{assign var=dniExist value=false}
<div class="col-sm-12"><h3 class="page-subheading top-indent">{l s='Invoice address'}</h3></div>
{foreach from=$inv_all_fields item=field_name}
{if $field_name eq "company"}
<div class="form-group col-sm-6">
<label for="company_invoice">{l s='Company'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>
<input type="text" class="text form-control" id="company_invoice" name="company_invoice" value="{if isset($smarty.post.company_invoice) && $smarty.post.company_invoice}{$smarty.post.company_invoice}{/if}" />
</div>
{elseif $field_name eq "vat_number"}
<div id="vat_number_block_invoice" style="display:none;" class="col-sm-6">
<div class="form-group">
<label for="vat_number_invoice">{l s='VAT number'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>
<input type="text" class="form-control" id="vat_number_invoice" name="vat_number_invoice" value="{if isset($smarty.post.vat_number_invoice) && $smarty.post.vat_number_invoice}{$smarty.post.vat_number_invoice}{/if}" />
{if $field_name eq "firstname"}
<div class="required form-group col-sm-6">
<label for="firstname_invoice">{l s='First name'} <sup>*</sup></label>
<input type="text" class="form-control" id="firstname_invoice" name="firstname_invoice" value="{if isset($smarty.post.firstname_invoice) && $smarty.post.firstname_invoice}{$smarty.post.firstname_invoice}{/if}" />
</div>
</div>
{elseif $field_name eq "dni"}
{assign var=dniExist value=true}
<div class="col-sm-6 required form-group dni_invoice">
<label for="dni_invoice">{l s='Identification number'} <sup>*</sup></label>
<input type="text" class="text form-control" name="dni_invoice" id="dni_invoice" value="{if isset($smarty.post.dni_invoice) && $smarty.post.dni_invoice}{$smarty.post.dni_invoice}{/if}" />
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
</div>
{elseif $field_name eq "firstname"}
<div class="required form-group col-sm-6">
<label for="firstname_invoice">{l s='First name'} <sup>*</sup></label>
<input type="text" class="form-control" id="firstname_invoice" name="firstname_invoice" value="{if isset($smarty.post.firstname_invoice) && $smarty.post.firstname_invoice}{$smarty.post.firstname_invoice}{/if}" />
</div>
{elseif $field_name eq "lastname"}
<div class="required form-group col-sm-6">
<label for="lastname_invoice">{l s='Last name'} <sup>*</sup></label>
<input type="text" class="form-control" id="lastname_invoice" name="lastname_invoice" value="{if isset($smarty.post.lastname_invoice) && $smarty.post.lastname_invoice}{$smarty.post.lastname_invoice}{/if}" />
</div>
{elseif $field_name eq "address1"}
<div class="required form-group col-sm-6">
<label for="address1_invoice">{l s='Address'} <sup>*</sup></label>
<input type="text" class="form-control" name="address1_invoice" id="address1_invoice" value="{if isset($smarty.post.address1_invoice) && $smarty.post.address1_invoice}{$smarty.post.address1_invoice}{/if}" />
</div>
{elseif $field_name eq "address2"}
<div class="form-group is_customer_param col-sm-6">
<label for="address2_invoice">{l s='Address (Line 2)'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>
<input type="text" class="form-control" name="address2_invoice" id="address2_invoice" value="{if isset($smarty.post.address2_invoice) && $smarty.post.address2_invoice}{$smarty.post.address2_invoice}{/if}" />
</div>
{elseif $field_name eq "postcode"}
{$postCodeExist = true}
<div class="required postcode_invoice form-group col-sm-6">
<label for="postcode_invoice">{l s='Zip/Postal Code'} <sup>*</sup></label>
<input type="text" class="validate form-control" name="postcode_invoice" id="postcode_invoice" data-validate="isPostCode" value="{if isset($smarty.post.postcode_invoice) && $smarty.post.postcode_invoice}{$smarty.post.postcode_invoice}{/if}"/>
</div>
{elseif $field_name eq "city"}
<div class="required form-group col-sm-6">
<label for="city_invoice">{l s='City'} <sup>*</sup></label>
<input type="text" class="form-control" name="city_invoice" id="city_invoice" value="{if isset($smarty.post.city_invoice) && $smarty.post.city_invoice}{$smarty.post.city_invoice}{/if}" />
</div>
{elseif $field_name eq "country" || $field_name eq "Country:name"}
<div class="required form-group col-sm-6">
<label for="id_country_invoice">{l s='Country'} <sup>*</sup></label>
<select name="id_country_invoice" id="id_country_invoice" class="form-control">
<option value="">-</option>
{foreach from=$countries item=v}
<option value="{$v.id_country}"{if (isset($smarty.post.id_country_invoice) && $smarty.post.id_country_invoice == $v.id_country) OR (!isset($smarty.post.id_country_invoice) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
</div>
{elseif $field_name eq "state" || $field_name eq 'State:name'}
{$stateExist = true}
<div class="required id_state_invoice form-group col-sm-6" style="display:none;">
<label for="id_state_invoice">{l s='State'} <sup>*</sup></label>
<select name="id_state_invoice" id="id_state_invoice" class="form-control">
<option value="">-</option>
</select>
</div>
{/if}
{elseif $field_name eq "lastname"}
<div class="required form-group col-sm-6">
<label for="lastname_invoice">{l s='Last name'} <sup>*</sup></label>
<input type="text" class="form-control" id="lastname_invoice" name="lastname_invoice" value="{if isset($smarty.post.lastname_invoice) && $smarty.post.lastname_invoice}{$smarty.post.lastname_invoice}{/if}" />
</div>
{elseif $field_name eq "address1"}
<div class="required form-group col-sm-6">
<label for="address1_invoice">{l s='Address'} <sup>*</sup></label>
<input type="text" class="form-control" name="address1_invoice" id="address1_invoice" value="{if isset($smarty.post.address1_invoice) && $smarty.post.address1_invoice}{$smarty.post.address1_invoice}{/if}" />
</div>
{elseif $field_name eq "address2"}
<div class="form-group is_customer_param col-sm-6">
<label for="address2_invoice">{l s='Address (Line 2)'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>
<input type="text" class="form-control" name="address2_invoice" id="address2_invoice" value="{if isset($smarty.post.address2_invoice) && $smarty.post.address2_invoice}{$smarty.post.address2_invoice}{/if}" />
</div>
{elseif $field_name eq "postcode"}
{$postCodeExist = true}
<div class="required postcode_invoice form-group col-sm-3">
<label for="postcode_invoice">{l s='Zip/Postal Code'} <sup>*</sup></label>
<input type="text" class="validate form-control" name="postcode_invoice" id="postcode_invoice" data-validate="isPostCode" value="{if isset($smarty.post.postcode_invoice) && $smarty.post.postcode_invoice}{$smarty.post.postcode_invoice}{/if}"/>
</div>
{elseif $field_name eq "city"}
<div class="required form-group col-sm-6">
<label for="city_invoice">{l s='City'} <sup>*</sup></label>
<input type="text" class="form-control" name="city_invoice" id="city_invoice" value="{if isset($smarty.post.city_invoice) && $smarty.post.city_invoice}{$smarty.post.city_invoice}{/if}" />
</div>
{elseif $field_name eq "country" || $field_name eq "Country:name"}
<div class="required form-group col-sm-3">
<label for="id_country_invoice">{l s='Country'} <sup>*</sup></label>
<select name="id_country_invoice" id="id_country_invoice" class="form-control custom-input">
<option value="">-</option>
{foreach from=$countries item=v}
<option value="{$v.id_country}"{if (isset($smarty.post.id_country_invoice) && $smarty.post.id_country_invoice == $v.id_country) OR (!isset($smarty.post.id_country_invoice) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
</div>
{elseif $field_name eq "state" || $field_name eq 'State:name'}
{$stateExist = true}
<div class="required id_state_invoice form-group col-sm-6" style="display:none;">
<label for="id_state_invoice">{l s='State'} <sup>*</sup></label>
<select name="id_state_invoice" id="id_state_invoice" class="form-control custom-input">
<option value="">-</option>
</select>
</div>
{/if}
{/foreach}
{if !$postCodeExist}
<div class="required postcode_invoice form-group unvisible col-sm-6">
@ -375,29 +327,18 @@
{if !$stateExist}
<div class="required id_state_invoice form-group unvisible col-sm-6">
<label for="id_state_invoice">{l s='State'} <sup>*</sup></label>
<select name="id_state_invoice" id="id_state_invoice" class="form-control">
<select name="id_state_invoice" id="id_state_invoice" class="form-control custom-input">
<option value="">-</option>
</select>
</div>
{/if}
{if $dniExist eq false}
<div class="required form-group dni_invoice col-sm-6">
<label for="dni">{l s='Identification number'} <sup>*</sup></label>
<input type="text" class="text form-control" name="dni_invoice" id="dni_invoice" value="{if isset($smarty.post.dni_invoice) && $smarty.post.dni_invoice}{$smarty.post.dni_invoice}{/if}" />
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
</div>
{/if}
{*<div class="form-group is_customer_param col-sm-6">
<label for="other_invoice">{l s='Additional information'}</label>
<textarea class="form-control" name="other_invoice" id="other_invoice" cols="26" rows="3"></textarea>
</div>*}
{if isset($one_phone_at_least) && $one_phone_at_least}
<p class="inline-infos required is_customer_param">{l s='You must register at least one phone number.'}</p>
{/if}
<div class="form-group is_customer_param col-sm-6">
<label for="phone_invoice">{l s='Home phone'}</label>
<input type="text" class="form-control" name="phone_invoice" id="phone_invoice" value="{if isset($smarty.post.phone_invoice) && $smarty.post.phone_invoice}{$smarty.post.phone_invoice}{/if}" />
</div>
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group col-sm-6">
<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="form-control" name="phone_mobile_invoice" id="phone_mobile_invoice" value="{if isset($smarty.post.phone_mobile_invoice) && $smarty.post.phone_mobile_invoice}{$smarty.post.phone_mobile_invoice}{/if}" />