{**
 * 2007-2017 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{block name='customer_form'}
  {block name='customer_form_errors'}
    {include file='_partials/form-errors.tpl' errors=$errors['']}
  {/block}

<form action="{block name='customer_form_actionurl'}{$action}{/block}" id="customer-form" class="js-customer-form" method="post">
  <section>
    {block "form_fields"}
      {foreach from=$formFields item="field"}
        {block "form_field"}
          {form_field field=$field}
        {/block}
      {/foreach}
      {$hook_create_account_form nofilter}
    {/block}
  </section>
  <section>
    <div class="form-group row">
      <label class="col-md-3 form-control-label required"></label>
      <div class="col-md-6">
        <span class="custom-checkbox">
          <label>
            <input name="psgdpr1" type="checkbox" value="1" required="">
            <span><i class="material-icons rtl-no-flip checkbox-checked"></i></span>
            Potwierdzam, że zapoznałem się z <a href="/pl/content/2-polityka-prywatnosci" target="_blank">polityką prywatności</a> sklepu internetowego
          </label>
          <small>Administratorem danych osobowych zbieranych za pośrednictwem sklepu internetowego jest Sprzedawca (PRZEDSIĘBIORSTWO PRODUKCYJNO-HANDLOWO-USŁUGOWE "2M" SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ). Dane są lub mogą być przetwarzane w celach oraz na podstawach wskazanych szczegółowo w polityce prywatności (np. realizacja umowy, marketing bezpośredni). Polityka prywatności zawiera pełną informację na temat przetwarzania danych przez administratora wraz z prawami przysługującymi osobie, której dane dotyczą. Szybki kontakt z administratorem: zam@redline.com.pl</small>
        </span>
      </div>
      <div class="col-md-3 form-control-comment"></div>
    </div>
  </section>

  {block name='customer_form_footer'}
    <footer class="form-footer clearfix">
      <input type="hidden" name="submitCreate" value="1">
      {block "form_buttons"}
        <button class="btn btn-primary form-control-submit float-xs-right" data-link-action="save-customer" type="submit">
          {l s='Save' d='Shop.Theme.Actions'}
        </button>
      {/block}
    </footer>
  {/block}

  {block name='display_after_login_form'}
    {hook h='displayCustomerLoginFormAfter'}
  {/block}


</form>
{/block}
{literal}
  <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.slim.min.js"></script>
  <script type="text/javascript">
    $( function()
    {
      var url = window.location.href;
      var url_parts = url.replace(/\/\s*$/,'').split('/');
      url_parts.shift();
      var url_tmp = url_parts[3];

      if ( $.urlParam('type') != 'b2b' )
      {
        $( 'input[name="company"]' ).parents('.form-group.row' ).hide();
        $( 'input[name="vat_number"]' ).parents('.form-group.row' ).hide();
        $( 'input[name="use_same_address"]' ).parents('.form-group.row' ).hide();
        $( 'input[name="newsletter"]' ).parents('.form-group.row' ).hide();
        $( 'input[name="siret"]' ).parents('.form-group.row' ).hide();
        $( 'input[name="phone"]' ).attr( 'required', 'required' ).parents( '.form-group.row' ).children( '.form-control-comment' ).hide();
        $( 'input[name="phone"]' ).parents( '.form-group.row' ).children( '.form-control-label' ).addClass( 'required' );
        $( '#checkout-addresses-step input[name="phone"]' ).removeAttr( 'required' ).parents('.form-group.row' ).hide();
      }
    });
  </script>
{/literal}