sermon-notes/templates/security/login.html.twig
2024-05-13 21:07:38 -04:00

50 lines
1.7 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Login{% endblock %}
{% block stylesheets %}
<link href='/theme/assets/css/login.css' rel='stylesheet'/>
<link href="/theme/assets/css/main.css" rel="stylesheet" />
{% endblock %}
{% block javascripts %}
<script src="/theme/assets/js/login.js"></script>
<script src="/theme/assets/js/jquery.min.js"></script>
<script src="/theme/assets/js/browser.min.js"></script>
<script src="/theme/assets/js/breakpoints.min.js"></script>
<script src="/theme/assets/js/util.js"></script>
<script src="/theme/assets/js/main.js"></script>
{% endblock %}
{% block body %}
<div class="container">
{% include('default/sidebar.html.twig') %}
<header>
<h1>Login</h1>
</header>
<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.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<fieldset>
<label for="username">Email:</label>
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" required autofocus>
<label for="password">Password:</label>
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" required>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
<button class="btn btn-lg btn-primary" type="submit">Sign in</button>
</fieldset>
</form>
</div>
{% endblock %}