vendor/datenwerk/ginger-bundle/Resources/views/security/login.html.twig line 1

Open in your IDE?
  1. {% extends "@DWGinger/base.html.twig" %}
  2. {% block title %}Login erforderlich{% endblock %}
  3. {% block body %}
  4.     <div class="row justify-content-center">
  5.         <div class="col-4">
  6.             <form method="post">
  7.                 {% if error %}
  8.                     <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  9.                 {% endif %}
  10.                 {% if app.user %}
  11.                     <div class="mb-3">
  12.                         Sie sind angemedet als {{ app.user.username }}, <a href="{{ path('ginger_logout') }}">Abmelden</a>
  13.                     </div>
  14.                 {% endif %}
  15.                 <h1 class="my-3 font-weight-normal">Anmeldung</h1>
  16.                 <label for="inputUsername">Benutzername</label>
  17.                 <input type="text" value="{{ last_username }}" name="username" id="inputUsername"
  18.                        class="form-control mb-3" required autofocus>
  19.                 <div class="form-group">
  20.                     <label for="inputPassword">Passwort</label>
  21.                     <div class="input-group mb-3" id="show_hide_password">
  22.                         <input type="password" name="password" id="inputPassword" class="form-control" required>
  23.                         <div class="input-group-append">
  24.                             <span class="input-group-text"><a href="#"><i class="fas fa-eye-slash"
  25.                                                                           aria-hidden="true"></i></a></span>
  26.                         </div>
  27.                     </div>
  28.                 </div>
  29.                 <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  30.                 <button class="btn btn-lg btn-primary btn-block mb-3" type="submit">
  31.                     Anmelden
  32.                 </button>
  33.             </form>
  34.             <a href="{{ path('ginger_forgot_password_request') }}">Passwort vergessen?</a>
  35.         </div>
  36.     </div>
  37. {% endblock %}
  38. {% block javascripts %}
  39.     {{ parent() }}
  40.     <script>
  41.         $(document).ready(function() {
  42.             $("#show_hide_password a").on("click", function(event) {
  43.                 event.preventDefault();
  44.                 if ($('#show_hide_password input').attr("type") == "text") {
  45.                     $('#show_hide_password input').attr("type", "password");
  46.                     $('#show_hide_password i').removeClass( "fa-eye" ).addClass( "fa-eye-slash" );
  47.                 } else if ($('#show_hide_password input').attr("type") == "password") {
  48.                     $('#show_hide_password input').attr("type", "text");
  49.                     $('#show_hide_password i').removeClass( "fa-eye-slash" ).addClass( "fa-eye" );
  50.                 }
  51.             });
  52.         });
  53.     </script>
  54. {% endblock %}