templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block body %}
  4.     <div class="row">
  5.         <div class="col-md-3">
  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.                         You are logged in as {{ app.user.fullName }}, <a
  13.                                 href="{{ path('app_logout') }}">Logout</a>
  14.                     </div>
  15.                 {% endif %}
  16.                 <h1 style="color: red" class="h3 mb-3 font-weight-normal">Please sign in</h1>
  17.                 <label for="inputEmail">Email</label>
  18.                 <input type="email" value="{{ last_username }}" name="email" id="inputEmail" class="form-control"
  19.                        autocomplete="email" required autofocus>
  20.                 <label for="inputPassword">Password</label>
  21.                 <input type="password" name="password" id="inputPassword" class="form-control"
  22.                        autocomplete="current-password" required>
  23.                 <input type="hidden" name="_csrf_token"
  24.                        value="{{ csrf_token('authenticate') }}">
  25.                 <br>
  26.                 <button class="btn btn-primary btn-sm" type="submit">Sign in</button>
  27.                 <br><br>
  28.                 <a href="{{ path('app_forgot_password_request') }}">Forgot password</a>
  29.                 <br><br><br>
  30.                 {% if CompanyDetails.companyDetails is not null %}
  31.                     {% if CompanyDetails.companyDetails.enableUserRegistration ==1 %}
  32.                         <h1 style="color: red" class="h3 mb-3 font-weight-normal">Welcome New Users</h1>
  33.                         If you would like to register for this website, please click <a href="{{ path('app_register') }}">here</a>
  34.                     {% endif %}
  35.                 {% endif %}
  36.             </form>
  37.             <hr>
  38.             <br><br><br><br>
  39.             {% if CompanyDetails.companyDetails is not null %}
  40.                 {% if app.request.getSchemeAndHttpHost() != CompanyDetails.companyDetails.companyWebsite %}
  41.                     <button onclick="fillForm()"><i class="fa fa-info-circle"> </i> nurse_stephen@hotmail.com
  42.                         (Super-Admin)
  43.                     </button>
  44.                     <br>
  45.                     <button onclick="fillForm2()"><i class="fa fa-info-circle"> </i> nurse_stephen2@hotmail.com
  46.                         (Super-Admin)
  47.                     </button>
  48.                     <br>
  49.                 {% endif %}
  50.             {% else %}
  51.                 <b>Please set up your "Company Details" profile.</b>
  52.                 <br>
  53.                 <br>
  54.                 <br>
  55.                 <button onclick="fillForm()"><i class="fa fa-info-circle"> </i> nurse_stephen@hotmail.com
  56.                     (Super-Admin)
  57.                 </button>
  58.                 <br>
  59.                 <button onclick="fillForm2()"><i class="fa fa-info-circle"> </i> nurse_stephen2@hotmail.com
  60.                     (Super-Admin)
  61.                 </button>
  62.                 <br>
  63.             {% endif %}
  64.         </div>
  65.     </div>
  66. {% endblock %}
  67. {% block javascripts %}
  68.     <script>
  69.         function fillForm() {
  70.             $("#inputEmail").val("nurse_stephen@hotmail.com").change();
  71.             $("#inputPassword").val("Descartes99").change();
  72.         }
  73.         function fillForm2() {
  74.             $("#inputEmail").val("nurse_stephen2@hotmail.com").change();
  75.             $("#inputPassword").val("Descartes99").change();
  76.         }
  77.     </script>
  78. {% endblock %}