templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'layout.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block stylesheets %}
  4.     {{ parent() }}
  5.     <style>
  6.         input:-webkit-autofill,
  7.         input:-webkit-autofill:hover,
  8.         input:-webkit-autofill:focus,
  9.         textarea:-webkit-autofill,
  10.         textarea:-webkit-autofill:hover,
  11.         textarea:-webkit-autofill:focus,
  12.         select:-webkit-autofill,
  13.         select:-webkit-autofill:hover,
  14.         select:-webkit-autofill:focus {
  15.             -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  16.         }
  17.         body {
  18.             background: #f4f4f4!important;
  19.         }
  20.         .form-control:focus {
  21.             border: solid 1px #7796a8;
  22.             outline: none;
  23.             box-shadow: none;
  24.         }
  25.     </style>
  26. {% endblock %}
  27. {% block body %}
  28.     <form method="post" class="container mb-5">
  29.         <div class="row pt-3">
  30.             <div class="col-12 text-center mt-1 pt-3 pb-3" id="order_header">
  31.                 <h4 class="text-primary">Fluid Sign In</h4>
  32.                 <span class="text-primary">
  33.                         Sign in to your Fluid wholesale account or easily create a new account.
  34.                     </span>
  35.             </div>
  36.         </div>
  37.         <div class="row mt-5">
  38.             {% if error %}
  39.                 <div class="col-12 col-md-10 offset-xs-0 offset-md-1">
  40.                     <div class="alert alert-danger">
  41.                         {{ error.messageKey|trans(error.messageData, 'security') }}
  42.                     </div>
  43.                 </div>
  44.             {% endif %}
  45.             <div class="col-12 col-md-4 offset-xs-0 offset-md-1">
  46.                 <input
  47.                     type="text"
  48.                     value="{{ last_username }}"
  49.                     name="email"
  50.                     id="inputEmail"
  51.                     class="form-control"
  52.                     placeholder="Email"
  53.                     autocomplete="email"
  54.                     style="margin-bottom: 20px;"
  55.                     autofocus
  56.                 >
  57.             </div>
  58.             <div class="col-12 col-md-4 position-relative">
  59.                 <input
  60.                     type="password"
  61.                     name="password"
  62.                     placeholder="Password"
  63.                     id="inputPassword"
  64.                     class="form-control"
  65.                     style="margin-bottom: 20px;"
  66.                     autocomplete="current-password"
  67.                     required
  68.                 >
  69.                 <i class="fa-solid fa-eye eye" id="eye"></i>
  70.             </div>
  71.             <div class="col-12 col-md-2">
  72.                 <button class="btn btn-primary w-100">SIGN IN</button>
  73.             </div>
  74.             <input type="hidden" name="_csrf_token"
  75.                    value="{{ csrf_token('authenticate') }}"
  76.             >
  77.         </div>
  78.         <div class="row text-center">
  79.             {% set url = 'app_forgot_password_request' %}
  80.             {% set url_register = 'distributor_reg' %}
  81.             {% if user_type == 'clinics' %}
  82.                 {% set url = 'clinic_forgot_password_request' %}
  83.                 {% set url_register = 'clinic_reg' %}
  84.             {% elseif user_type == 'distributors' %}
  85.                 {% set url = 'distributors_forgot_password_request' %}
  86.                 {% set url_register = 'distributor_reg' %}
  87.             {% elseif user_type == 'manufacturers' %}
  88.                 {% set url = 'manufacturers_forgot_password_request' %}
  89.                 {% set url_register = 'distributor_reg' %}
  90.             {% elseif user_type == 'retail' %}
  91.                 {% set url = 'retail_forgot_password_request' %}
  92.                 {% set url_register = 'retail_reg' %}
  93.             {% endif %}
  94.             <div class="col-12 col-md-10 offset-xs-0 offset-md-1 mt-3 mt-md-5">
  95.                 <a
  96.                     href="{{ path(url) }}"
  97.                     type="submit"
  98.                     class="fs-6"
  99.                 >
  100.                     Forgot Password
  101.                 </a>
  102.                 <span class="px-2">|</span>
  103.                 <a href="{{ path(url_register) }}" class="fs-6">
  104.                     Create Account
  105.                 </a>
  106.             </div>
  107.         </div>
  108.     </form>
  109. {% endblock %}
  110. {% block javascripts %}
  111.     {{ parent() }}
  112.     <script>
  113.         $(document).ready(function () {
  114.             $(document).on('click', '#eye', function (e) {
  115.                 let pwdField = $('#inputPassword');
  116.                 if(pwdField.attr('type') == 'password')
  117.                 {
  118.                     pwdField.attr('type', 'text');
  119.                 }
  120.                 else
  121.                 {
  122.                     pwdField.attr('type', 'password');
  123.                 };
  124.             });
  125.         });
  126.     </script>
  127. {% endblock %}