templates/default/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Homepage{% endblock %}
  3. {% block bodyStyle %}style="background-color: #1f1c40"{% endblock %}
  4. {% block content %}
  5.     <section id="page-title" class="page-title-center bg_pr">
  6.         <div class="container clearfix">
  7.             <h1 class="color_w">{% block admin_title %}Accedi a TILLOMED Italia{% endblock %}</h1>
  8.         </div>
  9.     </section>
  10.     <section class="m_tb_80p">
  11.         <div class="container">
  12.             <div class="row">
  13.                 <div class="col-12 col-md-8 offset-md-2 col-lg-6 offset-lg-3">
  14.                     <div class="txt_a_c">
  15.                         <img class="m_b_30p" width="200" src="{{ asset ('images/graphics/logo.png') }}">
  16.                     </div>
  17.                     <div class="tabs tabs-bb tabs-justify clearfix">
  18.                         <ul class="tab-nav clearfix">
  19.                             <li><a class="uppercase" href="#login">Accedi</a></li>
  20.                             <li><a class="uppercase" href="#register" id="registerBtn">Registrati</a></li>
  21.                         </ul>
  22.                         <div class="tab-container">
  23.                             <div class="tab-content clearfix" id="login">
  24.                                 {% if error %}
  25.                                     <div class="style-msg errormsg notice">
  26.                                         <div class="sb-msg"><i class="icon-remove"></i><strong>Attenzione!!!</strong> Username o password non corretti!</div>
  27.                                         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
  28.                                     </div>
  29.                                 {% endif %}
  30.                                 <form method="post">
  31.                                     <div class="row">
  32.                                         <div class="col-12 form-group m_b_20p">
  33.                                             <label>Email con cui sei registrato</label>
  34.                                             <input class="form-control" type="email" id="username" name="email" value="{{ last_username }}"/>
  35.                                         </div>
  36.                                         <div class="col-12 form-group">
  37.                                             <label>Password</label>
  38.                                             <input class="form-control" type="password" id="password" name="password" />
  39.                                         </div>
  40.                                         <div class="col-12 txt_a_c m_b_20p">
  41.                                             <a href="javascript:showRecovery()"><label class="font_12 color_pr"><u>Password dimenticata?</u></label></a>
  42.                                         </div>
  43.                                         <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  44.                                         <div class="col-12 txt_a_c">                                        
  45.                                             <button type="submit" class="button button-3d button-rounded button-green">Accedi</button>
  46.                                         </div>
  47.                                     </div>
  48.                                 </form>
  49.                             </div>
  50.                             <div class="tab-content clearfix" id="register">
  51.                                 {{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }}
  52.                                     <div class="row">
  53.                                         <div class="col-12 col-md-6 form-group m_b_20p">
  54.                                             <label>Nome*</label>
  55.                                             <div {{ form_errors(form.name) }}>
  56.                                                 {{ form_widget(form.name) }}
  57.                                             </div>
  58.                                         </div>
  59.                                         <div class="col-12 col-md-6 form-group m_b_20p">
  60.                                             <label>Cognome*</label>
  61.                                             <div {{ form_errors(form.surname) }}>
  62.                                                 {{ form_widget(form.surname) }}
  63.                                             </div>
  64.                                         </div>
  65.                                         <div class="col-12 col-md-6 form-group m_b_20p">
  66.                                             <label>Email*</label>
  67.                                             <div {{ form_errors(form.email.first) }}>
  68.                                                 {{ form_widget(form.email.first) }}
  69.                                             </div>
  70.                                         </div>
  71.                                         <div class="col-12 col-md-6 form-group m_b_20p">
  72.                                             <label>Ripeti email*</label>
  73.                                             <div {{ form_errors(form.email.second) }}>
  74.                                                 {{ form_widget(form.email.second) }}
  75.                                             </div>
  76.                                         </div>
  77.                                         <div class="col-12 form-group">
  78.                                             <label class="m_b_none color_555">Inserire una password RESISTENTE <a href="javascript:divHelp('strong_password')"><img src="{{ asset ('images/graphics/info.png') }}" class="info_icon"></a></label>
  79.                                         </div>
  80.                                         <div class="col-12 col-md-6 form-group m_b_20p">
  81.                                             <label>Password*</label>
  82.                                             <div {{ form_errors(form.password.first) }}>
  83.                                                 {{ form_widget(form.password.first) }}
  84.                                             </div>
  85.                                         </div>
  86.                                         <div class="col-12 col-md-6 form-group m_b_20p">
  87.                                             <label>Ripeti password*</label>
  88.                                             <div {{ form_errors(form.password.second) }}>
  89.                                                 {{ form_widget(form.password.second) }}
  90.                                             </div>
  91.                                         </div>
  92.                                         <div class="col-12 form-group overflow_a m_b_20p">
  93.                                             <table class="m_none">
  94.                                                 <tr>
  95.                                                     <td class="td_w_50p">{{ form_widget(form.terms, {'attr': {'class':'switch-toggle switch-toggle-flat switch-flat-mini' }}) }}<label for="{{ form.terms.vars.id }}"></label></td>
  96.                                                     <td><div {{ form_errors(form.terms) }}><label class="font_12 color_555">Ho letto e accetto i <a href="https://tillomed.it/documents/termini_e_condizioni.pdf" class="color_pr" target="_blank">termini e condizioni</a>*</div></td>
  97.                                                 </tr>
  98.                                                 <tr>
  99.                                                     <td class="td_w_50p">{{ form_widget(form.news, {'attr': {'class':'switch-toggle switch-toggle-flat switch-flat-mini' }}) }}<label for="{{ form.news.vars.id }}"></label></td>
  100.                                                     <td><label class="font_12 color_555">Voglio ricevere aggiornamenti e newsletter da TILLOMED Italia</label></td>
  101.                                                 </tr>
  102.                                             </table>
  103.                                         </div>
  104.                                         <div class="col-12 form-group txt_a_c m_b_20p">
  105.                                             <div {{ form_errors(form.recaptcha) }}>
  106.                                                 <div id="divRecaptcha" class="g-recaptcha" data-sitekey="6LfCPG4UAAAAAPgNU6PmV5VN7OjYWYzoYhJQB4wo"></div>
  107.                                             </div>
  108.                                         </div>
  109.                                         <div class="col-12 txt_a_c">
  110.                                             <p class="m_b_10p">
  111.                                                 <i><b>I campi contrassegnati con * sono obbligatori</b></i><br>
  112.                                             </p>
  113.                                         </div>
  114.                                         <div class="col-12 col-md-4 offset-md-4 txt_a_c">
  115.                                             <button type="submit" class="button button-3d button-rounded button-green">Registrati</button>
  116.                                         </div>
  117.                                     </div>
  118.                                 {{ form_end(form) }}
  119.                             </div>
  120.                         </div>
  121.                     </div>
  122.                 </div>
  123.             </div>
  124.         </div>
  125.     </section>
  126.     {# Modale recupero password #}
  127.     <div id="modalRecoverPsw" class="modal fade" tabindex="-1" role="dialog">
  128.         <div class="modal-dialog" role="document">
  129.             <div class="modal-content">
  130.                 <form action="{{ path('password_recovery') }}" method="post">
  131.                     <div class="modal-header"><h3 class="modal-title text-uppercase txt_a_c">Recupera Password<h3></div>
  132.                     <div class="modal-body">
  133.                         <div class="row">
  134.                             <div class="col-12 txt_a_c">
  135.                                 <p class="nobottommargin m_b_30p">Per recuperare la password inserisci l'email con cui sei registrato.<br>Riceverai una e-mail contenente le informazioni per l'accesso.</p>
  136.                                 <label class="f_left">Email con cui sei registrato</label>
  137.                                 <input class="form-control m_b_10p p_lr_10p" type="email" name="recovery"/>
  138.                                 <button for="recovery" type="submit" class="button button-3d button-rounded button-green">Recupera</button>
  139.                             </div>
  140.                         </div>
  141.                     </div>
  142.                 </form>
  143.             </div>
  144.         </div>
  145.     </div>
  146. {% endblock %}
  147. {% block javascripts %}
  148. {{ parent() }}
  149. <script>
  150.     {% if registerTab %}
  151.         $(document).ready( function(){
  152.             document.getElementById('registerBtn').modal('show');
  153.         });
  154.     {% endif %}
  155.     function showRecovery(){
  156.         $("#modalRecoverPsw").modal("show");
  157.     }
  158. </script>
  159. {% endblock %}