templates/security/login.html.twig line 25

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3. <form method="post" name="loginform" id="loginform">
  4.   
  5.     
  6.     {#
  7.         Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  8.         See https://symfony.com/doc/current/security/remember_me.html
  9.         <div class="checkbox mb-3">
  10.             <label>
  11.                 <input type="checkbox" name="_remember_me"> Remember me
  12.             </label>
  13.         </div>
  14.     #}
  15.                             
  16.                             {% embed "nav.html.twig" %}{% endembed %}
  17.                             
  18.                         <!-- Page Header Start -->
  19.                         <div class="page-header">
  20.                             <div class="container">
  21.                                 <div class="row">
  22.                                     <div class="col-12">
  23.                                         <h2>Login</h2>
  24.                                     </div>
  25.                                     
  26.                                 </div>
  27.                             </div>
  28.                         </div>
  29.                         <!-- Page Header End -->
  30.                     
  31.                 
  32. <input type="hidden" id="checkout" name="checkout" value="{{ checkout }}"> 
  33. <div class="contact">
  34.             <div class="container">
  35.                     <div class="col-12 wow fadeInUp" data-wow-delay="0.1s">
  36.                         <div class="contact-form">
  37.                             {% if error %}
  38.                                 <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  39.                             {% endif %}
  40.                             {% if message %}
  41.                                 <div class="alert alert-danger">{{ message }}</div>
  42.                             {% endif %}
  43.                             
  44.                                 <div class="control-group">
  45.                                     <input type="text" class="form-control" name="username" id="inputusername" placeholder="Benutzername" required="required" autofocus />
  46.                                     <p class="help-block text-danger"></p>
  47.                                 </div>
  48.                                 <div class="control-group">
  49.                                     <input type="password" class="form-control" name="password" id="inputPassword" placeholder="Passwort" required="required"  />
  50.                                     <p class="help-block text-danger"></p>
  51.                                 </div>
  52.                                 
  53.                                 
  54.                                 <div>
  55.                                     
  56.                                     <a class="btn" id="submitter" href="javascript:submitThis();">einloggen</a> &nbsp;&nbsp;&nbsp;
  57.                                     <a class="btn" id="registerer" href="javascript:register();">registrieren</a>
  58.                                 
  59.                                     <br>
  60.                                     <br>
  61.                                     <a href="{{ path('pwforgot') }}">Passwort vergessen?</a>
  62.                                 </div>
  63.                             
  64.                         </div>
  65.                     </div>
  66.                 </div>
  67.             </div>
  68.         </div>
  69.         <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  70. </form>
  71.     <script>
  72.     
  73.     $('#inputusername').keypress(function (e) {
  74.     if (e.which == 13) {
  75.         submitThis();
  76.     }
  77.     });
  78.     
  79.     $('#inputPassword').keypress(function (e) {
  80.     if (e.which == 13) {
  81.         submitThis();
  82.     }
  83.     });
  84.     
  85.     function register()
  86.     {
  87.         $('#submitter').css('display','none');
  88.         $('#registerer').css('display','none');
  89.         location.href="{{ path('register') }}";
  90.     }    
  91.     
  92.     function submitThis()
  93.     {
  94.         $('#submitter').css('display','none');
  95.         $('#registerer').css('display','none');
  96.         $('#loginform').submit();
  97.     }
  98.     </script>
  99. {% endblock %}