File "registrazione.tmpl"

Full Path: /srv/www/www.cadoro.it/src/templates/registrazione.tmpl
File size: 19.67 KB
MIME-type: text/html
Charset: utf-8

{extends "layout-base.tmpl"}

{block name=title}Registrazione — CADORO{/block}

{block name="head"}
<meta name="description" content="Registrazione &mdash; CADORO">
<meta name="author" content="">
{/block}

{block name="content"}
<div class="container content-section">
  {if $confirm}
  <h2 class="text-center">
    <strong>COMPLIMENTI!</strong>
  </h2>
  <hr>
  <div class="row mb20">
    <div class="col-sm-8 col-sm-offset-2">
      <h4 class="text-center">
        LA TUA REGISTRAZIONE È STATA COMPLETATA.<br>TI ABBIAMO MANDATO UN’EMAIL DI VERIFICA.<br>CLICCA SUL LINK CHE TROVI E CONFERMA LA TUA REGISTRAZIONE.<br>
        Se non ricevi l’email prova a controllare anche nella cartella spam.
      </h4>
    </div>
  </div>
  {else}
  {if $errors}
  <div class="alert alert-danger">
    <strong>Attenzione!</strong> Alcuni campi obbligatori non risultano compilati, controlla i dati inseriti.
  </div>
  {/if}
  {if $errors["reCAPTCHA"]}
  <div class="alert alert-danger">
    Verifica recaptcha fallita.
  </div>
  {/if}

  <h2 class="text-center mt40">
    <small><strong>NON SEI ANCORA REGISTRATO?</strong></small>
    <strong>REGISTRATI QUI. PER TE, SUBITO <span class="red">50 PUNTI</span> SULLA TUA CARD’ORO</strong>
  </h2>
  <p class="text-center mt20">
    Scopri il nuovo programma fedeltà Card’Oro.  Iscriviti con la tua carta fedeltà e naviga nella tua nuova area personale. 
    Visualizzerai il tuo <strong>saldo punti sempre aggiornato</strong> e potrai scoprire gli <strong>sconti oro attivi</strong>, 
    creare un archivio con i tuoi <strong>contenuti preferiti</strong>, consultare le ricette e creare la tua <strong>lista della spesa</strong>. 
    Inoltre, potrai presto partecipare a sondaggi sui prodotti e le attività di Cadoro per ricevere vantaggi esclusivi.
  </p>
  <div class="row">
    <div class="col-sm-12">
      {if $step eq 1}
      <div class="well well-bg-red mt80">
        <div class="row">
          <div class="col-sm-8">
            <img src="{$cdn_url}/images/cardoro.png" alt="">
            <h3>
              <strong>HAI LA CARD’ORO?</strong>
              <small><strong>Registrati subito<br>&nbsp;</strong></small>
            </h3>
            <form method="post" action="{$base_url}/registrazione" class="mt40">
              <div class="row">
                <div class="col-sm-6 mb10{if isset($errors.card)} has-error{/if}">
                  <input type="text" name="card" class="form-control" value="{_f('card')}" placeholder="TESSERA">
                  {if isset($errors.card) and $errors.card eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
                  {if isset($errors.card) and $errors.card eq 2}<p class="help-block has-error">Questo codice tessera risulta già registrato sul sito, esegui il <a href="{$base_url}/login">login</a> oppure usa la funzionalità di <a href="{$base_url}/password">recupero password.</a></p>{/if}
                  {if isset($errors.card) and $errors.card eq 3}<p class="help-block has-error">Questo codice tessera non è valido</p>{/if}
                  {if isset($errors.card) and $errors.card eq 4}<p class="help-block has-error">Il numero carta risulta bloccato</p>{/if}
                </div>
                <div class="col-sm-6 mb10{if isset($errors.birthday)} has-error{/if}">
                  <input type="text" name="birthday" class="form-control" value="{_fd('birthday', [])}" data-behaviour="datepicker" placeholder="DATA DI NASCITA">
                  {if isset($errors.birthday) and $errors.birthday eq 1}<p class="help-block has-error">{_("Campo obbligatorio!")}</p>{/if}
                  {if isset($errors.birthday) and $errors.birthday eq 2}<p class="help-block has-error">{_("La data di nascita inserita non corrisponde a quella associata alla tessera!")}</p>{/if}
                </div>
              </div>
              <p class="mt10 text-right">
                <button type="submit" class="btn btn-danger btn-lg">AVANTI</button>
              </p>
            </form>
          </div>
          <div class="col-sm-4">
            <h3>
              <strong>NON HAI LA CARD'ORO?</strong>
              <small><strong>Compila il form online<br>e ritirala in negozio</strong></small>
            </h3>
            <p class="mt40">
              <a href="{$base_url}/cardoro/richiedi" class="btn btn-default btn-lg">RICHIEDI CARD'ORO</a>
            </p>
          </div>
        </div>
      </div>
      {else}
      <form method="post" action="{$base_url}/registrazione">
        <input type="hidden" name="step" value="2">
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.card)} has-error{/if}">
            <label class="form-control-static" for="card">Tessera <strong class="red">*</strong></label>
            <input type="text" name="card" class="form-control" value="{_f('card', $user)}" readonly>
            {if isset($errors.card) and $errors.card eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.firstname)} has-error{/if}">
            <label class="form-control-static" for="firstname">Nome <strong class="red">*</strong></label>
          <input type="text" name="firstname" class="form-control" value="{_f('firstname', $user)}" readonly >
          {* <input type="text" name="firstname" class="form-control" value="{_f('firstname', $user)}" {if _f('firstname', $user) }readonly {/if}> *}
            {if isset($errors.firstname) and $errors.firstname eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
          <div class="col-sm-6 mt10{if isset($errors.lastname)} has-error{/if}">
            <label class="form-control-static" for="lastname">Cognome <strong class="red">*</strong></label>
            <input type="text" name="lastname" class="form-control" value="{_f('lastname', $user)}" readonly >
            {* <input type="text" name="lastname" class="form-control" value="{_f('lastname', $user)}" {if _f('lastname', $user) }readonly {/if}> *}
            {if isset($errors.lastname) and $errors.lastname eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.birthday)} has-error{/if}">
            <label class="form-control-static" for="birthday">{_("Data di nascita")} <strong class="red">*</strong></label>
            {*<input type="text" name="birthday" class="form-control" value="{$_fd['birthday']}" >*}
             <input type="text" name="birthday" id="birthday" class="form-control" value="{_fd('birthday',$user)}" {if _f('birthday', $user) && $user['birthday'] }readonly {/if}> 
              
            {if isset($errors.birthday) and $errors.birthday eq 1}<p class="help-block has-error">{_("Campo obbligatorio!")}</p>{/if}
          </div>
          <div class="col-sm-6 mt10{if isset($errors.gender)} has-error{/if}">
            <label class="form-control-static" for="gender">{_("Sesso")} <strong class="red">*</strong></label>
            <select class="form-control" id="gender" name="gender">
              <option value=""></option>
              {html_options options=$GENDERS selected=_f('gender', $user)}
            </select>
            {if isset($errors.gender) and $errors.gender eq 1}<p class="help-block has-error">{_("Campo obbligatorio!")}</p>{/if}
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.email)} has-error{/if}">
            <label class="form-control-static" for="email">Email <strong class="red">*</strong></label>
            <input type="text" name="email" class="form-control" value="{_f('email', $user)}">
            {if isset($errors.email) and $errors.email eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
            {if isset($errors.email) and $errors.email eq 2}<p class="help-block has-error">Email non valida: si prega di verificare nuovamente il dato inserito!</p>{/if}
            {if isset($errors.email) and $errors.email eq 3}<p class="help-block has-error">Questo indirizzo email risulta già registrato a CADORO</p>{/if}
          </div>
          <div class="col-sm-6 mt10{if isset($errors.email2)} has-error{/if}">
            <label class="form-control-static" for="email2">Conferma e-mail <strong class="red">*</strong></label>
            <input type="text" name="email2" class="form-control" value="{_f('email2', _f('email', $user))}">
            {if isset($errors.email2) and $errors.email2 eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
            {if isset($errors.email2) and $errors.email2 eq 2}<p class="help-block has-error">Le email inserite non corrispondono!</p>{/if}
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.password)} has-error{/if}">
            <label class="form-control-static" for="password">Password <strong class="red">*</strong></label>
            <input type="password" name="password" class="form-control" value="">
            {if not isset($errors.password)}<p class="help-block"><em>Minimo sei caratteri con almeno una lettera e una cifra.</em></p>{/if}
            {if isset($errors.password) and $errors.password eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
            {if isset($errors.password) and $errors.password eq 2}<p class="help-block has-error">Password non valida: minimo sei caratteri con almeno una lettera ed una cifra!</p>{/if}
          </div>
          <div class="col-sm-6 mt10{if isset($errors.password2)} has-error{/if}">
            <label class="form-control-static" for="password2">Conferma password <strong class="red">*</strong></label>
            <input type="password" name="password2" class="form-control" value="">
            {if isset($errors.password2) and $errors.password2 eq 1}<p class="help-block has-error">Le password inserite non corrispondono!</p>{/if}
          </div>
        </div>
        
        <div class="row">
		  <div class="col-sm-4 mt10{if isset($errors.address)} has-error{/if}">
            <label class="form-control-static" for="address">Indirizzo <strong class="red">*</strong></label>
            <input type="text" name="address" class="form-control" value="{_f('address', $user)}">
            {if isset($errors.address) and $errors.address eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
		  <div class="col-sm-2 mt10{if isset($errors.address_no)} has-error{/if}">
            <label class="form-control-static" for="address_no">Civico <strong class="red">*</strong></label>
            <input type="text" name="address_no" class="form-control" value="{_f('address_no', $user)}">
            {if isset($errors.address_no) and $errors.address_no eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
          <div class="col-sm-6 mt10{if isset($errors.city)} has-error{/if}">
            <label class="form-control-static" for="city">Città <strong class="red">*</strong></label>
            <input type="text" name="city" id="city" class="form-control" value="{_f('city', $user)}">
            {if isset($errors.city) and $errors.city eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.province)} has-error{/if}">
            <label class="form-control-static" for="province">Provincia <strong class="red">*</strong></label>
            <select class="form-control" id="province" name="province">
              <option value=""></option>
              {html_options options=$PROVINCES selected=_f('province', $user)}
            </select>
            {if isset($errors.province) and $errors.province eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
          <div class="col-sm-3 mt10{if isset($errors.zipcode)} has-error{/if}">
            <label class="form-control-static" for="zipcode">CAP <strong class="red">*</strong></label>
            <input type="text" name="zipcode" class="form-control" value="{_f('zipcode', $user)}" data-behaviour="numeric">
            {if isset($errors.zipcode) and $errors.zipcode eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
          <div class="col-sm-3 mt10{if isset($errors.country)} has-error{/if}">
            <label class="form-control-static" for="country">Nazione <strong class="red">*</strong></label>
            <select class="form-control" id="country" name="country">
              {html_options options=$COUNTRIES selected=_f('country', $user, 'IT')}
            </select>
            {if isset($errors.country) and $errors.country eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt10{if isset($errors.phone)} has-error{/if}">
            <label class="form-control-static" for="phone">Telefono</label>
            <input type="text" name="phone" class="form-control" value="{_f('phone', $user)}" data-behaviour="numeric">
            {if isset($errors.phone) and $errors.phone eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
          <div class="col-sm-6 mt10{if isset($errors.mobile)} has-error{/if}">
            <label class="form-control-static" for="mobile">Cellulare</label>
            <input type="text" name="mobile" class="form-control" value="{_f('mobile', $user)}" data-behaviour="numeric">
            {if isset($errors.mobile) and $errors.mobile eq 1}<p class="help-block has-error">Campo obbligatorio!</p>{/if}
          </div>
        </div>
		<div class="row">
          <div class="col-sm-12 mt10{if isset($errors.store)} has-error{/if}">
            <label class="form-control-static" for="store">{_("Punto vendita preferito")} <strong class="red">*</strong></label>
            {if _f('store', $user)}
            <input type="hidden" name="store" value="{_f('store', $user)}">
            <input type="text" class="form-control" value="{_v(_f('store', $user), $stores)}" readonly >
            
            {* <input type="text" class="form-control" value="{_v(_f('store', $user), $stores)}" {if _f('store', $user) }readonly {/if}> *}
            {else}
            <select class="form-control" id="store" name="store">
              <option value=""></option>
              {html_options options=$stores selected=_f('store', $user)}
            </select>
            {/if}
            {if isset($errors.store) and $errors.store eq 1}<p class="help-block has-error">{_("Campo obbligatorio!")}</p>{/if}
          </div>
        </div>
		
        <label class="form-control-static mt30" for="password">{_("CONDIZIONI GENERALI D'USO ED INFORMATIVA SULLA PRIVACY")} <strong class="red">*</strong></label>
        <div class="checkbox{if isset($errors.privacy)} has-error{/if}">
          <label>
            <input type="checkbox" name="privacy" value="1"{if _f('privacy', $principal)} checked disabled{/if}>
            {if _f('privacy', $principal)}<input type="hidden" name="privacy" value="1">{/if}
            {_("Ho ricevuto e letto l'")}<a href="{$base_url}/privacy" target="_blank">{_("informativa")}</a> {_("sul trattamento dei dati personali")} <span class="red">*</span>
          </label>
          {if isset($errors.privacy) and $errors.privacy eq 1}<p class="help-block has-error">{_("Campo obbligatorio!")}</p>{/if}
        </div>
        <label class="form-control-static mt30" for="password">
          <strong class="red">
            {_("ACCONSENTENDO AI PUNTI A, B E C RICEVERAI DEI PUNTI IN PIÙ SULLA TUA CARD’ORO")}<br>
            {_("Ricordati che i punti ti saranno accreditati a partire dal tuo primo accesso all’area personale del sito CADORO.")}
          </strong>
        </label>
        <div class="row">
          <div class="col-sm-6 mt20">
            <strong>A.</strong> Desidero ricevere comunicazioni di tipo <a href="{$base_url}/images/regolamento-cardoro-web.pdf" target="_blank">pubblicitario/promozionale</a> (punto a) dell’informativa) 
            {if isset($errors.privacy1) and $errors.privacy1 eq 1}<p class="help-block has-error red">{_("Campo obbligatorio!")}</p>{/if}
          </div>
          <div class="col-sm-2 mt20 text-right">
            <img src="{$cdn_url}/images/label-50punti.png" alt="+50 PUNTI">
          </div>
          <div class="col-sm-1 mt20">
            <div class="radio">
              <label>
                <input type="radio" name="privacy1" value="1"{if _f('privacy1', $principal) eq 1} checked="checked"{/if}> SÌ
              </label>
            </div>
          </div>
          <div class="col-sm-1 mt20">
            <div class="radio">
              <label>
                <input type="radio" name="privacy1" value="0"{if _f('privacy1', $principal) === "0"} checked="checked"{/if}> NO
              </label>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt20">
            <strong>B.</strong> Autorizzo la lettura della mie preferenze di acquisto al fine di <a href="{$base_url}/images/regolamento-cardoro-web.pdf" target="_blank">ricevere offerte personalizzate</a> (punto b) dell’informativa)
            {if isset($errors.privacy2) and $errors.privacy2 eq 1}<p class="help-block has-error red">{_("Campo obbligatorio!")}</p>{/if}
          </div>
          <div class="col-sm-2 mt20 text-right">
            <img src="{$cdn_url}/images/label-50punti.png" alt="+50 PUNTI">
          </div>
          <div class="col-sm-1 mt20">
            <div class="radio">
              <label>
                <input type="radio" name="privacy2" value="1"{if _f('privacy2', $principal) eq 1} checked="checked"{/if}> SÌ
              </label>
            </div>
          </div>
          <div class="col-sm-1 mt20">
            <div class="radio">
              <label>
                <input type="radio" name="privacy2" value="0"{if _f('privacy2', $principal) === "0"} checked="checked"{/if}> NO
              </label>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6 mt20">
            <strong>C.</strong> Sono interessato a partecipare a <a href="{$base_url}/images/regolamento-cardoro-web.pdf" target="_blank">ricerche di mercato</a> su prodotti e servizi (punto c) dell’informativa)
            {if isset($errors.privacy3) and $errors.privacy3 eq 1}<p class="help-block has-error red">{_("Campo obbligatorio!")}</p>{/if}
          </div>
          <div class="col-sm-2 mt20 text-right">
            <img src="{$cdn_url}/images/label-50punti.png" alt="+50 PUNTI">
          </div>
          <div class="col-sm-1 mt20">
            <div class="radio">
              <label>
                <input type="radio" name="privacy3" value="1"{if _f('privacy3', $principal) eq 1} checked="checked"{/if}> SÌ
              </label>
            </div>
          </div>
          <div class="col-sm-1 mt20">
            <div class="radio">
              <label>
                <input type="radio" name="privacy3" value="0"{if _f('privacy3', $principal) === "0"} checked="checked"{/if}> NO
              </label>
            </div>
          </div>
        </div>

        <p class="mt60 text-center">
        {* <input type="hidden" name="reToken" id="reToken" value="" /> *}
          <button type="submit" class="btn btn-danger btn-lg">REGISTRATI</button>
        </p>
      </form>
      {/if}
    </div>
    {/if}
  </div>
</div>
{/block}
{* {block name="js"}
  <script src="https://www.google.com/recaptcha/api.js?render=6LfXQakhAAAAAI4D-cjVdF--qF8m7RWtnh7x-KeF"></script>
  <script>
  grecaptcha.ready(function() {
    grecaptcha.execute('6LfXQakhAAAAAI4D-cjVdF--qF8m7RWtnh7x-KeF', { action: 'homepage' }).then(function(token) {
      $('#reToken').val(token);
    });
  });
  </script>
  {/block} *}