templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body_id 'login' %}
  3. {% block javascripts %}
  4.     {{ parent() }}
  5.     {{ encore_entry_script_tags('js/login') }}
  6. {% endblock %}
  7. {% block main %}
  8.     {% if error %}
  9.         <div class="alert alert-danger">
  10.             {{ error.messageKey|trans(error.messageData, 'security') }}
  11.         </div>
  12.     {% endif %}
  13.     <div class="row">
  14.         <div class="col-sm-5">
  15.             <div class="well">
  16.                 <form action="{{ path('security_login') }}" method="post">
  17.                     <fieldset>
  18.                         <legend><i class="fa fa-lock" aria-hidden="true"></i> {{ 'title.login'|trans }}</legend>
  19.                         <div class="form-group">
  20.                             <label for="username">{{ 'label.username'|trans }}</label>
  21.                             <input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control"/>
  22.                         </div>
  23.                         <div class="form-group">
  24.                             <label for="password">{{ 'label.password'|trans }}</label>
  25.                             <input type="password" id="password" name="_password" class="form-control" />
  26.                         </div>
  27.                         <input type="hidden" name="_target_path" value="{{ app.request.get('redirect_to') }}"/>
  28.                         <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
  29.                         <button type="submit" class="btn btn-primary">
  30.                             <i class="fa fa-sign-in" aria-hidden="true"></i> {{ 'action.sign_in'|trans }}
  31.                         </button>
  32.                     </fieldset>
  33.                 </form>
  34.             </div>
  35.         </div>
  36.         <div id="login-help" class="col-sm-7">
  37.             <h3>
  38.                 <i class="hidden-xs fa fa-long-arrow-left" aria-hidden="true"></i>
  39.                 {{ 'help.login_users'|trans }}
  40.             </h3>
  41.             <table class="table table-striped table-bordered table-hover">
  42.                 <thead>
  43.                     <tr>
  44.                         <th scope="col">{{ 'label.username'|trans }}</th>
  45.                         <th scope="col">{{ 'label.password'|trans }}</th>
  46.                         <th scope="col">{{ 'label.role'|trans }}</th>
  47.                     </tr>
  48.                 </thead>
  49.                 <tbody>
  50.                     <tr>
  51.                         <td>john_user</td>
  52.                         <td>kitten</td>
  53.                         <td><code>ROLE_USER</code> ({{ 'help.role_user'|trans }})</td>
  54.                     </tr>
  55.                     <tr>
  56.                         <td>jane_admin</td>
  57.                         <td>kitten</td>
  58.                         <td><code>ROLE_ADMIN</code> ({{ 'help.role_admin'|trans }})</td>
  59.                     </tr>
  60.                 </tbody>
  61.             </table>
  62.             <div id="login-users-help" class="panel panel-default">
  63.                 <div class="panel-body">
  64.                     <p>
  65.                         <span class="label label-success">{{ 'note'|trans }}</span>
  66.                         {{ 'help.reload_fixtures'|trans }}<br/>
  67.                         <code class="console">$ php bin/console doctrine:fixtures:load</code>
  68.                     </p>
  69.                     <p>
  70.                         <span class="label label-success">{{ 'tip'|trans }}</span>
  71.                         {{ 'help.add_user'|trans }}<br/>
  72.                         <code class="console">$ php bin/console app:add-user</code>
  73.                     </p>
  74.                 </div>
  75.             </div>
  76.         </div>
  77.     </div>
  78. {% endblock %}
  79. {% block sidebar %}
  80.     {{ parent() }}
  81.     {{ show_source_code(_self) }}
  82. {% endblock %}