{% extends 'base.html.twig' %}
{% block title %}Log in!{% endblock %}
{% block body %}
<div class="row">
<div class="col-md-3">
<form method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3">
You are logged in as {{ app.user.fullName }}, <a
href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<h1 style="color: red" class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail">Email</label>
<input type="email" value="{{ last_username }}" name="email" id="inputEmail" class="form-control"
autocomplete="email" required autofocus>
<label for="inputPassword">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control"
autocomplete="current-password" required>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}">
<br>
<button class="btn btn-primary btn-sm" type="submit">Sign in</button>
<br><br>
<a href="{{ path('app_forgot_password_request') }}">Forgot password</a>
<br><br><br>
{% if CompanyDetails.companyDetails is not null %}
{% if CompanyDetails.companyDetails.enableUserRegistration ==1 %}
<h1 style="color: red" class="h3 mb-3 font-weight-normal">Welcome New Users</h1>
If you would like to register for this website, please click <a href="{{ path('app_register') }}">here</a>
{% endif %}
{% endif %}
</form>
<hr>
<br><br><br><br>
{% if CompanyDetails.companyDetails is not null %}
{% if app.request.getSchemeAndHttpHost() != CompanyDetails.companyDetails.companyWebsite %}
<button onclick="fillForm()"><i class="fa fa-info-circle"> </i> nurse_stephen@hotmail.com
(Super-Admin)
</button>
<br>
<button onclick="fillForm2()"><i class="fa fa-info-circle"> </i> nurse_stephen2@hotmail.com
(Super-Admin)
</button>
<br>
{% endif %}
{% else %}
<b>Please set up your "Company Details" profile.</b>
<br>
<br>
<br>
<button onclick="fillForm()"><i class="fa fa-info-circle"> </i> nurse_stephen@hotmail.com
(Super-Admin)
</button>
<br>
<button onclick="fillForm2()"><i class="fa fa-info-circle"> </i> nurse_stephen2@hotmail.com
(Super-Admin)
</button>
<br>
{% endif %}
</div>
</div>
{% endblock %}
{% block javascripts %}
<script>
function fillForm() {
$("#inputEmail").val("nurse_stephen@hotmail.com").change();
$("#inputPassword").val("Descartes99").change();
}
function fillForm2() {
$("#inputEmail").val("nurse_stephen2@hotmail.com").change();
$("#inputPassword").val("Descartes99").change();
}
</script>
{% endblock %}