{% extends "Froxlor/base.html.twig" %}

{% block content %}
	<div class="container">
		<div class="row justify-content-center">
			<form action="index.php" class="col-12 max-w-420 d-flex flex-column" method="post" enctype="application/x-www-form-urlencoded">
				<img class="align-self-center my-5" src="{{ header_logo_login }}" alt="Froxlor Server Management Panel"/>

				<div class="card shadow">
					<div class="card-body">
						<h5 class="card-title">{{ pagetitle }}</h5>

						{% if message is not empty %}
							<div class="alert alert-danger" role="alert">
								<h4 class="alert-heading">{{ lng('error.error') }}</h4>
								<p>{{ message|raw }}</p>
							</div>
						{% endif %}

						<div class="mb-3">
							<label for="2fa_code" class="col-form-label">{{ lng('login.2facode') }}</label>
							<input class="form-control" type="text" name="2fa_code" id="2fa_code" value="" autocomplete="one-time-code" autofocus required/>
						</div>

						{% if remember_me %}
						<div class="mb-3">
							<div class="form-check form-switch">
								<input type="hidden" name="2fa_remember" value="0"/>
								<input class="form-check-input" type="checkbox" id="2fa_remember" name="2fa_remember" value="1">
								<label class="form-check-label" for="2fa_remember">{{ lng('login.2faremember') }}</label>
							</div>
						</div>
						{% endif %}

					</div>

					<div class="card-body d-grid gap-2">
						<input type="hidden" name="action" value="2fa_verify"/>
						<input type="hidden" name="send" value="send"/>
						<button class="btn btn-primary" type="submit" name="2faverify">{{ lng('2fa.2fa_verify') }}</button>
					</div>
				</div>
			</form>
		</div>
	</div>
{% endblock %}
