templates/Exchange/Security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'exchange.html.twig' %}
  2. {% block body %}
  3.     {% if app.request.hasPreviousSession %}
  4.         {% for type, messages in app.session.flashbag.all() %}
  5.             {% for message in messages %}
  6.                 <div class="flash-{{ type }}">
  7.                     {{ message }}
  8.                 </div>
  9.             {% endfor %}
  10.         {% endfor %}
  11.     {% endif %}
  12.     <div>
  13.         {% include 'Exchange/Default/header.html.twig' %}
  14.         <div class="login__background">
  15.             <div class="login__container">
  16.                 <div class="login__container--icon">
  17.                     <span class="login__title">The English Access Scholarship Program Participant Portal</span>
  18.                 </div>
  19.                 <form action="" method="post">
  20.                     <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
  21.                     <div class="formgroup">
  22.                         <label for="username">Email Address</label>
  23.                         <input class="form-control" type="text" id="username" name="username" required="required" />
  24.                     </div>
  25.                     <div class="formgroup">
  26.                         <label for="password">Password</label>
  27.                         <input class="form-control" type="password" id="password" name="password" required="required" />
  28.                         {% if error %}
  29.                             <br><div class="error">&#9888; {{ error.messageKey|trans(error.messageData, 'security') }}</div>
  30.                         {% endif %}
  31.                     </div>
  32.                     <input type="hidden" name="bypass" id="bypass" />
  33.                     <input class="btn btn-success login__btn" type="submit" id="_submit" name="_submit" value="Log In" />
  34.                 </form>
  35.             </div>
  36.         </div>
  37.         {% include 'Exchange/Default/footer.html.twig' %}
  38.     </div>
  39. {% endblock %}
  40. {% block javascripts %}
  41.     <script type="application/javascript">
  42.         $(document).ready(function(){
  43.             //randomly load the background image based on the list
  44.             var images = ['exchange-login-background.jpg', 'exchange-login-background-2.jpg'];
  45.             $('.login__background').css({'background-image': 'url(/images/exchanges/' + images[Math.floor(Math.random() * images.length)] + ')'});
  46.         });
  47.     </script>
  48. {%  endblock %}