{% extends 'authentication/layout.html.twig' %}
{% block title %}
Digital T cards Systems are an effective tool to track and record various processes in any business. T-Card Software ease overall processes.
{% endblock %}
{% block body %}
<!--begin::Content-->
<div class="d-flex flex-column flex-lg-row-fluid py-10">
<!--begin::Content-->
<div class="d-flex flex-center flex-column flex-column-fluid">
<!--begin::Wrapper-->
<div class="w-lg-500px p-10 p-lg-15 mx-auto">
<!--begin::Form-->
<form class="form w-100" novalidate="novalidate" id="kt_sign_in_form" method="post" action="{{ path('app_login') }}">
<!--begin::Heading-->
<div class="text-center mb-10">
<!--begin::Title-->
<div class="brand-logos mb-10">
<img src="assets/media/logos/logo-1.png" class="img-fluid">
<img src="assets/media/logos/logo-2.png" class="img-fluid">
</div>
<h1 class="text-dark mb-3">
{{ 'SIGN_IN_TO_TCARD'|trans }}
</h1>
<!--end::Title-->
<!--begin::Link-->
{# <div class="text-gray-400 fw-bold fs-4">
{{ 'NEW_HERE'|trans }}?
<a href="{{ path('app_register') }}" class="link-primary fw-bolder">
{{ 'CREATE_AN_ACCOUNT'|trans }}
</a>
</div> #}
<!--end::Link-->
</div>
<!--begin::Heading-->
<!--begin::Input group-->
<div class="fv-row mb-10">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">
{{ 'EMAIL'|trans }}
</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control form-control-lg form-control-solid" placeholder="{{ 'EMAIL'|trans }}" type="text" name="email" autocomplete="off" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row mb-10">
<!--begin::Wrapper-->
<div class="d-flex flex-stack mb-2">
<!--begin::Label-->
<label class="form-label fw-bolder text-dark fs-6 mb-0">
{{ 'PASSWORD'|trans }}
</label>
<!--end::Label-->
<!--begin::Link-->
<a href="/reset-password" class="link-primary fs-6 fw-bolder">
{{ 'FORGOT_PASSWORD'|trans }} </a>
<!--end::Link-->
</div>
<!--end::Wrapper-->
<!--begin::Input-->
<!--<input class="form-control form-control-lg form-control-solid" type="password" name="password" autocomplete="off" />-->
<div class="position-relative mb-3"> <input class="form-control form-control-lg form-control-solid" type="password" placeholder="{{ 'PASSWORD'|trans }}" name="password" id="inputPassword" autocomplete="off" />
<span toggle="#inputPassword" class="btn btn-sm btn-icon position-absolute translate-middle top-50 end-0 me-n6 text-gray-400 toggle-password bi fs-2 bi-eye-slash" data-kt-password-meter-control="visibility"></span>
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Actions-->
<div class="text-center">
<!--begin::Submit button-->
<button type="submit" id="kt_sign_in_submit_" class="btn btn-lg btn-primary w-100 mb-5">
<span class="indicator-label">
{{ 'SIGN_IN'|trans }}
</span>
<span class="indicator-progress">{{ 'PLEASE_WAIT'|trans }}
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
</span>
</button>
<!--end::Submit button-->
{% if error %}
<!--begin::Alert-->
<div class="alert alert-danger alert-dismissible bg-light-danger d-flex flex-column flex-sm-row w-100 p-5 mb-10">
<!--begin::Icon-->
<span class="svg-icon svg-icon-3hx svg-icon-danger me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<rect opacity="0.3" x="2" y="2" width="20" height="20" rx="10" fill="currentColor"></rect>
<rect x="11" y="14" width="7" height="2" rx="1" transform="rotate(-90 11 14)" fill="currentColor"></rect>
<rect x="11" y="17" width="2" height="2" rx="1" transform="rotate(-90 11 17)" fill="currentColor"></rect>
</svg>
</span>
<!--end::Icon-->
<!--begin::Wrapper-->
{% if error.message == 'emailnotfound' %}
{% set error_head = 'INVALID_USR_MSG_HEAD'|trans %}
{% set error_message = 'INVALID_USR_MSG'|trans %}
{% elseif error.message == 'notuserverify' %}
{% set error_head = 'USER_NOT_VERIFIED_EMAIL_HEAD'|trans %}
{% set error_message = 'USER_NOT_VERIFIED_EMAIL'|trans %}
{% elseif error.message == 'notverify' %}
{% set error_head = 'ADMIN_NOT_APPROVED_REGISTRATION_HEAD'|trans %}
{% set error_message = 'ADMIN_NOT_APPROVED_REGISTRATION'|trans %}
{% elseif error.message == 'notactive' %}
{% set error_head = 'ADMIN_NOT_ACTIVATE_REGISTRATION_HEAD'|trans %}
{% set error_message = 'ADMIN_NOT_ACTIVATE_REGISTRATION'|trans %}
{% else %}
{% set error_head = 'INVALID_USR_MSG_HEAD'|trans %}
{% set error_message = 'INVALID_USR_MSG'|trans %}
{% endif %}
<div class="d-flex flex-column">
<!--begin::Title-->
<h4 class="mb-1 text-danger">
{{ error_head }}
</h4>
<!--end::Title-->
<!--begin::Content-->
<span>
{{ error_message }}
</span>
<!--end::Content-->
</div>
<!--end::Wrapper-->
<!--begin::Close-->
<button type="button" class="position-absolute position-sm-relative m-2 m-sm-0 top-0 end-0 btn btn-icon ms-sm-auto" data-bs-dismiss="alert">
<i class="bi bi-x fs-1 text-danger"></i>
</button>
<!--end::Close-->
</div>
<!--end::Alert-->
{% endif %}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
</div>
<!--end::Actions-->
</form>
<!--end::Form-->
</div>
<!--end::Wrapper-->
</div>
<!--end::Content-->
<!--begin::Footer-->
<div class="d-flex flex-center flex-wrap fs-6 p-5 pb-0">
<!--begin::Links-->
<div class="d-flex flex-center fw-bold fs-6">
<!--<a href="https://keenthemes.com" class="text-muted text-hover-primary px-2" target="_blank">About</a>-->
<p>
{{ 'POWERED_BY'|trans }}
<a class="text-muted text-hover-primary px-2" target="_blank" href="https://www.leantransitionsolutions.com">
{{ 'LTS'|trans }}
</a>
<a href="https://www.leantransitionsolutions.com/">
<img src="assets/images/lts_logo-new-footer.png" height="20"></a>
</p>
</div>
<!--end::Links-->
</div>
<!--end::Footer-->
</div>
<!--end::Content-->
{% endblock %}
{% block stylesheets %}{% endblock %}
{% block modal %}{% endblock %}
{% block underscore %}{% endblock %}
{% block javascripts %}
{# <script src="assets/js/custom/authentication/sign-in/general.js"></script> #}
<script>
// var hasError = '{{ error ? 1 : 0 }}';
$( document ).on('click', '.toggle-password',function() {
$(this).toggleClass("bi-eye bi-eye-slash");
var input = $($(this).attr("toggle"));
if (input.attr("type") == "password") {
input.attr("type", "text");
} else {
input.attr("type", "password");
}
});
/**
* Login error
*/
// if(hasError === '1'){
// Swal.fire({text:"Sorry, looks like there are some errors detected, please try again.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary" }})
// }
</script>
{% endblock %}