{% extends 'base.html.twig' %}
{% block title %}Access Portal{% endblock %}
{% block stylesheets %}
{% endblock %}
{% block body %}
{% include 'Portal/Alerts/flash-alerts.html.twig' %}
<div class="hero__container">
<div class="hero__container__right">
<div class="login__container">
{% if check_if_javascript_is_enabled == 'yes' %}
<noscript>
<h1 class="medium-text-center form-error is-visible error__box">
Attention: JavaScript is disabled on this internet browser. This is required for the Portal to run properly. Follow these instructions to enable JavaScript:<br />
<a target="_blank" href="/technical_guides/77870d35-effb-902f-2c29-5b8564a84f7e">How to Enable JavaScript.</a>
</h1>
</noscript>
{% endif %}
{% if check_if_cookie_is_enabled == 'yes' %}
<h1 class="medium-text-center form-error error__box" id="cookie-message">
Attention: Cookies are disabled on this internet browser. This is required for the Portal to run properly. Follow these instructions to enable Cookies:<br />
<a target="_blank" href="/technical_guides/246641be-56fe-59b0-cd4b-5b85a2fac447">How to Enable Cookies.</a>
</h1>
{% endif %}
{% if check_browser_compatible == 'no' %}
<h1 class="is-visible new_error__box"><b>
<h3>Attention</h3>
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:
<br><br>
<ul>
<li><a href="https://www.google.com/intl/en/chrome/" target="_blank">Chrome</a></li>
<li><a href="https://www.apple.com/safari/" target="_blank">Safari</a></li>
<li><a href="https://www.mozilla.org/en-US/firefox/new/" target="_blank">Mozilla</a></li>
</ul></b>
</h1>
{% else %}
<div class="login__container--icon">
<span class="login__title"><img src="/bundles/portal/images/access_logo_1.png?version=2"></span>
</div>
{% set refererUrl = app.request.getRequestUri()|split("referer_url=") %}
{% set url = (refererUrl[1] is defined) ? refererUrl[1] : "" %}
<form action="{{ path('login', {'referer_url': url }) }}" method="post" class="login__container--form">
<input class="input" id="username" name="_username" placeholder="username" type="text" onkeyup="trimSpaces()" value="{{ lastUserName }}"></input>
<input class="input" type="password" name="_password" id="password" placeholder="password"></input>
<button class="button button--primary button--wide" type="submit">Log In</button>
<a href="{{ path('reset-password') }}" class="link">Forgot your password?</a>
<a target=_blank href="https://fhi360.atlassian.net/servicedesk/customer/portal/3/create/10260" class="link">New user? Request an account here.</a>
</form>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type='text/javascript'>
(function(){
$( document ).ready(function() {
$(".button--primary").css("background-color","#002d62");
$('.alert').addClass('animate');
$('.alert__close').click(function(el){
$(el.target).closest('.alert').hide();
});
{% if check_if_cookie_is_enabled == 'yes' %}
if(navigator.cookieEnabled == false){
$('#cookie-message').addClass('is-visible');
}
{% endif %}
});
})();
function trimSpaces() {
var x = document.getElementById("username");
x.value = x.value.replace(/\s+/g, '');
}
</script>
{% endblock %}