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

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Access Portal{% endblock %}
  3. {% block stylesheets %}
  4. {% endblock %}
  5. {% block body %}
  6.     {% include 'Portal/Alerts/flash-alerts.html.twig' %}
  7.     <div class="hero__container">
  8.         <div class="hero__container__right">
  9.             <div class="login__container">
  10.                 {% if check_if_javascript_is_enabled == 'yes' %}
  11.                     <noscript>
  12.                         <h1 class="medium-text-center form-error is-visible error__box">
  13.                             Attention: JavaScript is disabled on this internet browser. This is required for the Portal to run properly. Follow these instructions to enable JavaScript:<br />
  14.                             <a target="_blank" href="/technical_guides/77870d35-effb-902f-2c29-5b8564a84f7e">How to Enable JavaScript.</a>
  15.                             </h1>
  16.                     </noscript>
  17.                 {% endif %}
  18.                 {% if check_if_cookie_is_enabled == 'yes' %}
  19.                     <h1 class="medium-text-center form-error error__box" id="cookie-message">
  20.                         Attention: Cookies are disabled on this internet browser. This is required for the Portal to run properly. Follow these instructions to enable Cookies:<br />
  21.                         <a target="_blank" href="/technical_guides/246641be-56fe-59b0-cd4b-5b85a2fac447">How to Enable Cookies.</a>
  22.                     </h1>
  23.                 {% endif %}
  24.                 {% if check_browser_compatible == 'no' %}
  25.                     <h1 class="is-visible new_error__box"><b>
  26.                         <h3>Attention</h3>
  27.                         This browser is not supported by the Access Portal. To ensure a successful experience with our systems, please use one of the following browsers to log in:
  28.                         <br><br>
  29.                         <ul>
  30.                             <li><a href="https://www.google.com/intl/en/chrome/" target="_blank">Chrome</a></li>
  31.                             <li><a href="https://www.apple.com/safari/" target="_blank">Safari</a></li>
  32.                             <li><a href="https://www.mozilla.org/en-US/firefox/new/" target="_blank">Mozilla</a></li>
  33.                         </ul></b>
  34.                     </h1>
  35.                 {% else %}
  36.                 <div class="login__container--icon">
  37.                     <span class="login__title"><img src="/bundles/portal/images/access_logo_1.png?version=2"></span>
  38.                 </div>
  39.                 {% set refererUrl = app.request.getRequestUri()|split("referer_url=") %}
  40.                 {% set url = (refererUrl[1] is defined) ? refererUrl[1]  : "" %}
  41.                 <form action="{{ path('login', {'referer_url': url }) }}" method="post" class="login__container--form">
  42.                     <input class="input" id="username" name="_username" placeholder="username" type="text" onkeyup="trimSpaces()" value="{{ lastUserName }}"></input>
  43.                     <input class="input" type="password" name="_password" id="password" placeholder="password"></input>
  44.                     <button class="button button--primary button--wide" type="submit">Log In</button>
  45.                     <a href="{{ path('reset-password') }}" class="link">Forgot your password?</a>
  46.                     <a target=_blank href="https://fhi360.atlassian.net/servicedesk/customer/portal/3/create/10260" class="link">New user? Request an account here.</a>
  47.                 </form>
  48.                 {% endif %}
  49.             </div>
  50.         </div>
  51.         
  52.     </div>
  53. {% endblock %}
  54. {% block javascripts %}
  55. {{ parent() }}
  56. <script type='text/javascript'>
  57. (function(){
  58.     $( document ).ready(function() {
  59.     $(".button--primary").css("background-color","#002d62");
  60.       $('.alert').addClass('animate');
  61.       
  62.       $('.alert__close').click(function(el){
  63.           $(el.target).closest('.alert').hide();
  64.       });
  65.         {% if check_if_cookie_is_enabled == 'yes' %}
  66.             if(navigator.cookieEnabled == false){
  67.                 $('#cookie-message').addClass('is-visible');
  68.              }
  69.         {% endif %}
  70.         
  71.     });    
  72. })();
  73. function trimSpaces() {
  74.     var x = document.getElementById("username");
  75.     x.value = x.value.replace(/\s+/g, '');
  76. }
  77. </script>
  78. {% endblock %}