<?php
use \sven\sys\core as CORE;

$token = $auth->createCSRF("login");

CORE::addReplacement('head', 'TITLE', 'Login');

CORE::addTemplate('main', <<<EOF
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12 mx-auto mt-3">
				<div class="row">
					<div class="col-md-2"></div>
					<div class="col-md-8">
						<h2>Login</h2>
						<form name="login">
							<div class="form-group">
								<label for="loginUser">Benutzername</label>
								<input type="test" class="form-control" id="loginUser" name="loginUser" placeholder="Gib deinen Benutzernamen ein">
							</div>
							<div class="form-group">
								<label for="loginPass">Passwort</label>
								<input type="password" class="form-control" id="loginPass" name="loginPass" placeholder="Und hier dein Passwort">
							</div>
							<input type="hidden" id="csrf_token" name="csrf_token" value="%%main_CSRF%%">
							<div class="row float-right">
								<button type="submit" class="btn btn-primary">Login</button>
							</div>
						</form>
					</div>
					<div class="col-md-2"></div>
				</div>
			</div>
		</div>
	</div>
EOF
);
CORE::addReplacement('main', 'CSRF', $token);
?>
