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

{% block content %}
	<div class="container">
		<div class="row justify-content-center">
			<form action="{{ formaction }}" 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 upd_in_progress %}
							<div class="alert alert-warning" role="alert">
								{{ lng('update.updateinprogress_onlyadmincanlogin')|raw }}
							</div>
						{% elseif successmsg is not empty %}
							<div class="alert alert-success" role="alert">
								<h4 class="alert-heading">{{ lng('success.success') }}</h4>
								<p>{{ successmsg|raw }}</p>
							</div>
						{% elseif 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="loginname" class="col-form-label">{{ lng('login.username') }}</label>
							<input class="form-control" type="text" name="loginname" id="loginname" value="" required autofocus/>
						</div>

						<div class="mb-3">
							<label for="loginemail" class="col-form-label">{{ lng('login.email') }}</label>
							<input class="form-control" type="email" name="loginemail" id="loginemail" value="" required/>
						</div>
					</div>

					<div class="card-body d-grid gap-2">
						<button class="btn btn-primary" type="submit" name="doremind">{{ lng('login.remind') }}</button>
					</div>

					<div class="card-footer">
						<a class="card-link text-body-secondary" href="index.php">
							<i class="fa-solid fa-angles-left"></i>
							{{ lng('login.backtologin') }}</a>
					</div>
				</div>
			</form>
		</div>
	</div>
{% endblock %}
