PageRenderTime 56ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/themes/default/authentication.tpl

https://bitbucket.org/marcenuc/prestashop
Smarty Template | 583 lines | 522 code | 8 blank | 53 comment | 39 complexity | 902a4d77d02023bd151bad74d2acda8f MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0
  1. {*
  2. * 2007-2012 PrestaShop
  3. *
  4. * NOTICE OF LICENSE
  5. *
  6. * This source file is subject to the Academic Free License (AFL 3.0)
  7. * that is bundled with this package in the file LICENSE.txt.
  8. * It is also available through the world-wide-web at this URL:
  9. * http://opensource.org/licenses/afl-3.0.php
  10. * If you did not receive a copy of the license and are unable to
  11. * obtain it through the world-wide-web, please send an email
  12. * to license@prestashop.com so we can send you a copy immediately.
  13. *
  14. * DISCLAIMER
  15. *
  16. * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
  17. * versions in the future. If you wish to customize PrestaShop for your
  18. * needs please refer to http://www.prestashop.com for more information.
  19. *
  20. * @author PrestaShop SA <contact@prestashop.com>
  21. * @copyright 2007-2012 PrestaShop SA
  22. * @version Release: $Revision: 6594 $
  23. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  24. * International Registered Trademark & Property of PrestaShop SA
  25. *}
  26. {capture name=path}{l s='Login'}{/capture}
  27. {include file="$tpl_dir./breadcrumb.tpl"}
  28. <script type="text/javascript">
  29. // <![CDATA[
  30. idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}false{/if};
  31. countries = new Array();
  32. countriesNeedIDNumber = new Array();
  33. countriesNeedZipCode = new Array();
  34. {if isset($countries)}
  35. {foreach from=$countries item='country'}
  36. {if isset($country.states) && $country.contains_states}
  37. countries[{$country.id_country|intval}] = new Array();
  38. {foreach from=$country.states item='state' name='states'}
  39. countries[{$country.id_country|intval}].push({ldelim}'id' : '{$state.id_state|intval}', 'name' : '{$state.name|addslashes}'{rdelim});
  40. {/foreach}
  41. {/if}
  42. {if $country.need_identification_number}
  43. countriesNeedIDNumber.push({$country.id_country|intval});
  44. {/if}
  45. {if isset($country.need_zip_code)}
  46. countriesNeedZipCode[{$country.id_country|intval}] = {$country.need_zip_code};
  47. {/if}
  48. {/foreach}
  49. {/if}
  50. $(function(){ldelim}
  51. $('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
  52. {rdelim});
  53. //]]>
  54. {if $vat_management}
  55. {literal}
  56. $(document).ready(function() {
  57. $('#company').blur(function(){
  58. vat_number();
  59. });
  60. vat_number();
  61. function vat_number()
  62. {
  63. if ($('#company').val() != '')
  64. $('#vat_number').show();
  65. else
  66. $('#vat_number').hide();
  67. }
  68. });
  69. {/literal}
  70. {/if}
  71. </script>
  72. <h1>{if !isset($email_create)}{l s='Log in'}{else}{l s='Create your account'}{/if}</h1>
  73. {include file="$tpl_dir./errors.tpl"}
  74. {assign var='stateExist' value=false}
  75. {if !isset($email_create)}
  76. <script type="text/javascript">
  77. {literal}
  78. $(document).ready(function(){
  79. $('#create-account_form').submit(function(){
  80. submitFunction();
  81. return false;
  82. });
  83. $('#SubmitCreate').click(function(){
  84. submitFunction();
  85. });
  86. });
  87. function submitFunction()
  88. {
  89. $('#create_account_error').html('').hide();
  90. //send the ajax request to the server
  91. $.ajax({
  92. type: 'POST',
  93. url: baseUri,
  94. async: true,
  95. cache: false,
  96. dataType : "json",
  97. data: {
  98. controller: 'authentication',
  99. SubmitCreate: 1,
  100. ajax: true,
  101. email_create: $('#email_create').val(),
  102. token: token
  103. },
  104. success: function(jsonData)
  105. {
  106. if (jsonData.hasError)
  107. {
  108. var errors = '';
  109. for(error in jsonData.errors)
  110. //IE6 bug fix
  111. if(error != 'indexOf')
  112. errors += '<li>'+jsonData.errors[error]+'</li>';
  113. $('#create_account_error').html('<ol>'+errors+'</ol>').show();
  114. }
  115. else
  116. {
  117. // adding a div to display a transition
  118. $('#center_column').html('<div id="noSlide">'+$('#center_column').html()+'</div>');
  119. $('#noSlide').fadeOut('slow', function(){
  120. $('#noSlide').html(jsonData.page);
  121. // update the state (when this file is called from AJAX you still need to update the state)
  122. bindStateInputAndUpdate();
  123. });
  124. $('#noSlide').fadeIn('slow');
  125. document.location = '#account-creation';
  126. }
  127. },
  128. error: function(XMLHttpRequest, textStatus, errorThrown)
  129. {
  130. alert("TECHNICAL ERROR: unable to load form.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
  131. }
  132. });
  133. }
  134. {/literal}
  135. </script>
  136. <!--{if isset($authentification_error)}
  137. <div class="error">
  138. {if {$authentification_error|@count} == 1}
  139. <p>{l s='There is one error'} :</p>
  140. {else}
  141. <p>{l s='There are %s errors' sprintf=[$account_error|@count]} :</p>
  142. {/if}
  143. <ol>
  144. {foreach from=$authentification_error item=v}
  145. <li>{$v}</li>
  146. {/foreach}
  147. </ol>
  148. </div>
  149. {/if}-->
  150. <form action="{$link->getPageLink('authentication', true)}" method="post" id="create-account_form" class="std">
  151. <fieldset>
  152. <h3>{l s='Create your account'}</h3>
  153. <div class="form_content clearfix">
  154. <h4>{l s='Enter your e-mail address to create an account'}.</h4>
  155. <div class="error" id="create_account_error" style="display:none"></div>
  156. <p class="text">
  157. <label for="email_create">{l s='E-mail address'}</label>
  158. <span><input type="text" id="email_create" name="email_create" value="{if isset($smarty.post.email_create)}{$smarty.post.email_create|stripslashes}{/if}" class="account_input" /></span>
  159. </p>
  160. <p class="submit">
  161. {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if}
  162. <input type="button" id="SubmitCreate" name="SubmitCreate" class="button_large" value="{l s='Create your account'}" />
  163. <input type="hidden" class="hidden" name="SubmitCreate" value="{l s='Create your account'}" />
  164. </p>
  165. </div>
  166. </fieldset>
  167. </form>
  168. <form action="{$link->getPageLink('authentication', true)}" method="post" id="login_form" class="std">
  169. <fieldset>
  170. <h3>{l s='Already registered?'}</h3>
  171. <div class="form_content clearfix">
  172. <p class="text">
  173. <label for="email">{l s='E-mail address'}</label>
  174. <span><input type="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" class="account_input" /></span>
  175. </p>
  176. <p class="text">
  177. <label for="passwd">{l s='Password'}</label>
  178. <span><input type="password" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|stripslashes}{/if}" class="account_input" /></span>
  179. </p>
  180. <p class="lost_password"><a href="{$link->getPageLink('password')}">{l s='Forgot your password?'}</a></p>
  181. <p class="submit">
  182. {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if}
  183. <input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="{l s='Log in'}" />
  184. </p>
  185. </div>
  186. </fieldset>
  187. </form>
  188. {if isset($inOrderProcess) && $inOrderProcess && $PS_GUEST_CHECKOUT_ENABLED}
  189. <form action="{$link->getPageLink('authentication', true, NULL, "back=$back")}" method="post" id="new_account_form" class="std clearfix">
  190. <fieldset>
  191. <h3>{l s='Instant Checkout'}</h3>
  192. <div id="opc_account_form" style="display: block; ">
  193. <!-- Account -->
  194. <p class="required text">
  195. <label for="guest_email">{l s='E-mail address'} <sup>*</sup></label>
  196. <input type="text" class="text" id="guest_email" name="guest_email" value="{if isset($smarty.post.guest_email)}{$smarty.post.guest_email}{/if}">
  197. </p>
  198. <p class="radio required">
  199. <span>{l s='Title'}</span>
  200. {foreach from=$genders key=k item=gender}
  201. <input type="radio" name="id_gender" id="id_gender{$gender->id}" value="{$gender->id}" {if isset($smarty.post.id_gender) && $smarty.post.id_gender == $gender->id}checked="checked"{/if} />
  202. <label for="id_gender{$gender->id}" class="top">{$gender->name}</label>
  203. {/foreach}
  204. </p>
  205. <p class="required text">
  206. <label for="firstname">{l s='First name'} <sup>*</sup></label>
  207. <input type="text" class="text" id="firstname" name="firstname" onblur="$('#customer_firstname').val($(this).val());" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}">
  208. <input type="hidden" class="text" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}">
  209. </p>
  210. <p class="required text">
  211. <label for="lastname">{l s='Last name'} <sup>*</sup></label>
  212. <input type="text" class="text" id="lastname" name="lastname" onblur="$('#customer_lastname').val($(this).val());" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}">
  213. <input type="hidden" class="text" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}">
  214. </p>
  215. <p class="select">
  216. <span>{l s='Date of Birth'}</span>
  217. <select id="days" name="days">
  218. <option value="">-</option>
  219. {foreach from=$days item=day}
  220. <option value="{$day}" {if ($sl_day == $day)} selected="selected"{/if}>{$day}&nbsp;&nbsp;</option>
  221. {/foreach}
  222. </select>
  223. {*
  224. {l s='January'}
  225. {l s='February'}
  226. {l s='March'}
  227. {l s='April'}
  228. {l s='May'}
  229. {l s='June'}
  230. {l s='July'}
  231. {l s='August'}
  232. {l s='September'}
  233. {l s='October'}
  234. {l s='November'}
  235. {l s='December'}
  236. *}
  237. <select id="months" name="months">
  238. <option value="">-</option>
  239. {foreach from=$months key=k item=month}
  240. <option value="{$k}" {if ($sl_month == $k)} selected="selected"{/if}>{l s=$month}&nbsp;</option>
  241. {/foreach}
  242. </select>
  243. <select id="years" name="years">
  244. <option value="">-</option>
  245. {foreach from=$years item=year}
  246. <option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}&nbsp;&nbsp;</option>
  247. {/foreach}
  248. </select>
  249. </p>
  250. {if isset($newsletter) && $newsletter}
  251. <p class="checkbox">
  252. <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) && $smarty.post.newsletter == '1'}checked="checked"{/if}>
  253. <label for="newsletter">{l s='Sign up for our newsletter'}</label>
  254. </p>
  255. <p class="checkbox">
  256. <input type="checkbox" name="optin" id="optin" value="1" {if isset($smarty.post.optin) && $smarty.post.optin == '1'}checked="checked"{/if}>
  257. <label for="optin">{l s='Receive special offers from our partners'}</label>
  258. </p>
  259. {/if}
  260. <h3>{l s='Delivery address'}</h3>
  261. {foreach from=$dlv_all_fields item=field_name}
  262. {if $field_name eq "company"}
  263. <p class="text">
  264. <label for="company">{l s='Company'}</label>
  265. <input type="text" class="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{/if}" />
  266. </p>
  267. {elseif $field_name eq "vat_number"}
  268. <div id="vat_number" style="display:none;">
  269. <p class="text">
  270. <label for="vat_number">{l s='VAT number'}</label>
  271. <input type="text" class="text" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{/if}" />
  272. </p>
  273. </div>
  274. {elseif $field_name eq "address1"}
  275. <p class="required text">
  276. <label for="address1">{l s='Address'} <sup>*</sup></label>
  277. <input type="text" class="text" name="address1" id="address1" value="{if isset($smarty.post.address1)}{$smarty.post.address1}{/if}">
  278. </p>
  279. {elseif $field_name eq "postcode"}
  280. <p class="required postcode text">
  281. <label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
  282. <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());">
  283. </p>
  284. {elseif $field_name eq "city"}
  285. <p class="required text">
  286. <label for="city">{l s='City'} <sup>*</sup></label>
  287. <input type="text" class="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{/if}">
  288. </p>
  289. <!--
  290. if customer hasn't update his layout address, country has to be verified
  291. but it's deprecated
  292. -->
  293. {elseif $field_name eq "Country:name" || $field_name eq "country"}
  294. <p class="required select">
  295. <label for="id_country">{l s='Country'} <sup>*</sup></label>
  296. <select name="id_country" id="id_country">
  297. <option value="">-</option>
  298. {foreach from=$countries item=v}
  299. <option value="{$v.id_country}" {if ($sl_country == $v.id_country)} selected="selected"{/if}>{$v.name}</option>
  300. {/foreach}
  301. </select>
  302. </p>
  303. {elseif $field_name eq "State:name"}
  304. {assign var='stateExist' value=true}
  305. <p class="required id_state select">
  306. <label for="id_state">{l s='State'} <sup>*</sup></label>
  307. <select name="id_state" id="id_state">
  308. <option value="">-</option>
  309. </select>
  310. </p>
  311. {elseif $field_name eq "phone"}
  312. <p class="required text">
  313. <label for="phone">{l s='Phone'} <sup>*</sup></label>
  314. <input type="text" class="text" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}">
  315. </p>
  316. {/if}
  317. {/foreach}
  318. {if $stateExist eq false}
  319. <p class="required id_state select">
  320. <label for="id_state">{l s='State'} <sup>*</sup></label>
  321. <select name="id_state" id="id_state">
  322. <option value="">-</option>
  323. </select>
  324. </p>
  325. {/if}
  326. <input type="hidden" name="alias" id="alias" value="{l s='My address'}">
  327. <input type="hidden" name="is_new_customer" id="is_new_customer" value="0">
  328. <!-- END Account -->
  329. </div>
  330. </fieldset>
  331. <fieldset class="account_creation dni">
  332. <h3>{l s='Tax identification'}</h3>
  333. <p class="required text">
  334. <label for="dni">{l s='Identification number'}</label>
  335. <input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{/if}" />
  336. <span class="form_info">{l s='DNI / NIF / NIE'}</span>
  337. </p>
  338. </fieldset>
  339. {$HOOK_CREATE_ACCOUNT_FORM}
  340. <p class="cart_navigation required submit">
  341. <span><sup>*</sup>{l s='Required field'}</span>
  342. <input type="hidden" name="display_guest_checkout" value="1" />
  343. <input type="submit" class="exclusive" name="submitGuestAccount" id="submitGuestAccount" value="{l s='Continue'}">
  344. </p>
  345. </form>
  346. {/if}
  347. {else}
  348. <!--{if isset($account_error)}
  349. <div class="error">
  350. {if {$account_error|@count} == 1}
  351. <p>{l s='There is one error'} :</p>
  352. {else}
  353. <p>{l s='There are %s errors' sprintf=[$account_error|@count]} :</p>
  354. {/if}
  355. <ol>
  356. {foreach from=$account_error item=v}
  357. <li>{$v}</li>
  358. {/foreach}
  359. </ol>
  360. </div>
  361. {/if}-->
  362. <form action="{$link->getPageLink('authentication', true)}" method="post" id="account-creation_form" class="std">
  363. {$HOOK_CREATE_ACCOUNT_TOP}
  364. <fieldset class="account_creation">
  365. <h3>{l s='Your personal information'}</h3>
  366. <p class="radio required">
  367. <span>{l s='Title'}</span>
  368. {foreach from=$genders key=k item=gender}
  369. <input type="radio" name="id_gender" id="id_gender{$gender->id}" value="{$gender->id}" {if isset($smarty.post.id_gender) && $smarty.post.id_gender == $gender->id}checked="checked"{/if} />
  370. <label for="id_gender{$gender->id}" class="top">{$gender->name}</label>
  371. {/foreach}
  372. </p>
  373. <p class="required text">
  374. <label for="customer_firstname">{l s='First name'} <sup>*</sup></label>
  375. <input onkeyup="$('#firstname').val(this.value);" type="text" class="text" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.customer_firstname)}{$smarty.post.customer_firstname}{/if}" />
  376. </p>
  377. <p class="required text">
  378. <label for="customer_lastname">{l s='Last name'} <sup>*</sup></label>
  379. <input onkeyup="$('#lastname').val(this.value);" type="text" class="text" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.customer_lastname)}{$smarty.post.customer_lastname}{/if}" />
  380. </p>
  381. <p class="required text">
  382. <label for="email">{l s='E-mail'} <sup>*</sup></label>
  383. <input type="text" class="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email}{/if}" />
  384. </p>
  385. <p class="required password">
  386. <label for="passwd">{l s='Password'} <sup>*</sup></label>
  387. <input type="password" class="text" name="passwd" id="passwd" />
  388. <span class="form_info">{l s='(5 characters min.)'}</span>
  389. </p>
  390. <p class="select">
  391. <span>{l s='Date of Birth'}</span>
  392. <select id="days" name="days">
  393. <option value="">-</option>
  394. {foreach from=$days item=day}
  395. <option value="{$day}" {if ($sl_day == $day)} selected="selected"{/if}>{$day}&nbsp;&nbsp;</option>
  396. {/foreach}
  397. </select>
  398. {*
  399. {l s='January'}
  400. {l s='February'}
  401. {l s='March'}
  402. {l s='April'}
  403. {l s='May'}
  404. {l s='June'}
  405. {l s='July'}
  406. {l s='August'}
  407. {l s='September'}
  408. {l s='October'}
  409. {l s='November'}
  410. {l s='December'}
  411. *}
  412. <select id="months" name="months">
  413. <option value="">-</option>
  414. {foreach from=$months key=k item=month}
  415. <option value="{$k}" {if ($sl_month == $k)} selected="selected"{/if}>{l s=$month}&nbsp;</option>
  416. {/foreach}
  417. </select>
  418. <select id="years" name="years">
  419. <option value="">-</option>
  420. {foreach from=$years item=year}
  421. <option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}&nbsp;&nbsp;</option>
  422. {/foreach}
  423. </select>
  424. </p>
  425. {if $newsletter}
  426. <p class="checkbox" >
  427. <input type="checkbox" name="newsletter" id="newsletter" value="1" {if isset($smarty.post.newsletter) AND $smarty.post.newsletter == 1} checked="checked"{/if} />
  428. <label for="newsletter">{l s='Sign up for our newsletter'}</label>
  429. </p>
  430. <p class="checkbox" >
  431. <input type="checkbox"name="optin" id="optin" value="1" {if isset($smarty.post.optin) AND $smarty.post.optin == 1} checked="checked"{/if} />
  432. <label for="optin">{l s='Receive special offers from our partners'}</label>
  433. </p>
  434. {/if}
  435. </fieldset>
  436. {if $b2b_enable}
  437. <fieldset class="account_creation">
  438. <h3>{l s='Your company information'}</h3>
  439. <p class="text">
  440. <label for="">{l s='Company'}</label>
  441. <input type="text" class="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{/if}" />
  442. </p>
  443. <p class="text">
  444. <label for="siret">{l s='SIRET'}</label>
  445. <input type="text" class="text" id="siret" name="siret" value="{if isset($smarty.post.siret)}{$smarty.post.siret}{/if}" />
  446. </p>
  447. <p class="text">
  448. <label for="ape">{l s='APE'}</label>
  449. <input type="text" class="text" id="ape" name="ape" value="{if isset($smarty.post.ape)}{$smarty.post.ape}{/if}" />
  450. </p>
  451. <p class="text">
  452. <label for="website">{l s='Website'}</label>
  453. <input type="text" class="text" id="website" name="website" value="{if isset($smarty.post.website)}{$smarty.post.website}{/if}" />
  454. </p>
  455. </fieldset>
  456. {/if}
  457. {if isset($PS_REGISTRATION_PROCESS_TYPE) && $PS_REGISTRATION_PROCESS_TYPE}
  458. <fieldset class="account_creation">
  459. <h3>{l s='Your address'}</h3>
  460. {foreach from=$dlv_all_fields item=field_name}
  461. {if $field_name eq "company"}
  462. <p class="text">
  463. <label for="company">{l s='Company'}</label>
  464. <input type="text" class="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{/if}" />
  465. </p>
  466. {elseif $field_name eq "vat_number"}
  467. <div id="vat_number" style="display:none;">
  468. <p class="text">
  469. <label for="vat_number">{l s='VAT number'}</label>
  470. <input type="text" class="text" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{/if}" />
  471. </p>
  472. </div>
  473. {elseif $field_name eq "firstname"}
  474. <p class="required text">
  475. <label for="firstname">{l s='First name'} <sup>*</sup></label>
  476. <input type="text" class="text" id="firstname" name="firstname" value="{if isset($smarty.post.firstname)}{$smarty.post.firstname}{/if}" />
  477. </p>
  478. {elseif $field_name eq "lastname"}
  479. <p class="required text">
  480. <label for="lastname">{l s='Last name'} <sup>*</sup></label>
  481. <input type="text" class="text" id="lastname" name="lastname" value="{if isset($smarty.post.lastname)}{$smarty.post.lastname}{/if}" />
  482. </p>
  483. {elseif $field_name eq "address1"}
  484. <p class="required text">
  485. <label for="address1">{l s='Address'} <sup>*</sup></label>
  486. <input type="text" class="text" name="address1" id="address1" value="{if isset($smarty.post.address1)}{$smarty.post.address1}{/if}" />
  487. <span class="inline-infos">{l s='Street address, P.O. box, company name, c/o'}</span>
  488. </p>
  489. {elseif $field_name eq "address2"}
  490. <p class="text">
  491. <label for="address2">{l s='Address (Line 2)'}</label>
  492. <input type="text" class="text" name="address2" id="address2" value="{if isset($smarty.post.address2)}{$smarty.post.address2}{/if}" />
  493. <span class="inline-infos">{l s='Apartment, suite, unit, building, floor, etc.'}</span>
  494. </p>
  495. {elseif $field_name eq "postcode"}
  496. <p class="required postcode text">
  497. <label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
  498. <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());" />
  499. </p>
  500. {elseif $field_name eq "city"}
  501. <p class="required text">
  502. <label for="city">{l s='City'} <sup>*</sup></label>
  503. <input type="text" class="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{/if}" />
  504. </p>
  505. <!--
  506. if customer hasn't update his layout address, country has to be verified
  507. but it's deprecated
  508. -->
  509. {elseif $field_name eq "Country:name" || $field_name eq "country"}
  510. <p class="required select">
  511. <label for="id_country">{l s='Country'} <sup>*</sup></label>
  512. <select name="id_country" id="id_country">
  513. <option value="">-</option>
  514. {foreach from=$countries item=v}
  515. <option value="{$v.id_country}" {if ($sl_country == $v.id_country)} selected="selected"{/if}>{$v.name}</option>
  516. {/foreach}
  517. </select>
  518. </p>
  519. {elseif $field_name eq "State:name" || $field_name eq 'state'}
  520. {assign var='stateExist' value=true}
  521. <p class="required id_state select">
  522. <label for="id_state">{l s='State'} <sup>*</sup></label>
  523. <select name="id_state" id="id_state">
  524. <option value="">-</option>
  525. </select>
  526. </p>
  527. {/if}
  528. {/foreach}
  529. {if $stateExist eq false}
  530. <p class="required id_state select">
  531. <label for="id_state">{l s='State'} <sup>*</sup></label>
  532. <select name="id_state" id="id_state">
  533. <option value="">-</option>
  534. </select>
  535. </p>
  536. {/if}
  537. <p class="textarea">
  538. <label for="other">{l s='Additional information'}</label>
  539. <textarea name="other" id="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{/if}</textarea>
  540. </p>
  541. {if $onr_phone_at_least}
  542. <p class="inline-infos">{l s='You must register at least one phone number'}</p>
  543. {/if}
  544. <p class="text">
  545. <label for="phone">{l s='Home phone'}</label>
  546. <input type="text" class="text" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}" />
  547. </p>
  548. <p class="text">
  549. <label for="phone_mobile">{l s='Mobile phone'} {if $onr_phone_at_least}<sup>*</sup>{/if}</label>
  550. <input type="text" class="text" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
  551. </p>
  552. <p class="required text" id="address_alias">
  553. <label for="alias">{l s='Assign an address alias for future reference'} <sup>*</sup></label>
  554. <input type="text" class="text" name="alias" id="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else}{l s='My address'}{/if}" />
  555. </p>
  556. </fieldset>
  557. <fieldset class="account_creation dni">
  558. <h3>{l s='Tax identification'}</h3>
  559. <p class="required text">
  560. <label for="dni">{l s='Identification number'}</label>
  561. <input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{/if}" />
  562. <span class="form_info">{l s='DNI / NIF / NIE'}</span>
  563. </p>
  564. </fieldset>
  565. {/if}
  566. {$HOOK_CREATE_ACCOUNT_FORM}
  567. <p class="cart_navigation required submit">
  568. <input type="hidden" name="email_create" value="1" />
  569. <input type="hidden" name="is_new_customer" value="1" />
  570. {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if}
  571. <input type="submit" name="submitAccount" id="submitAccount" value="{l s='Register'}" class="exclusive" />
  572. <span><sup>*</sup>{l s='Required field'}</span>
  573. </p>
  574. </form>
  575. {/if}