Advertisement
Guest User

Untitled

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