Create everything required to login and register
This commit is contained in:
32
templates/security/login.html.twig
Normal file
32
templates/security/login.html.twig
Normal file
@ -0,0 +1,32 @@
|
||||
{% extends 'base/base.html.twig' %}
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<form action="{{ path('login') }}" 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 already logged in as {{ app.user }}, <a href="{{ path('logout') }}">Logout</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h1 class="h3 mb-3 font-weight-normal">Please login</h1>
|
||||
<label for="inputUsername">Username</label>
|
||||
<input type="text" value="{{ last_username }}" name="_username" id="inputUsername" class="form-control" required
|
||||
autofocus>
|
||||
<br/>
|
||||
<label for="inputPassword">Password</label>
|
||||
<input type="password" name="_password" id="inputPassword" class="form-control" required>
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||
<br/>
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">Login</button>
|
||||
</form>
|
||||
{% endblock %}
|
6
templates/security/register.html.twig
Normal file
6
templates/security/register.html.twig
Normal file
@ -0,0 +1,6 @@
|
||||
{% extends 'base/base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="h3 mb-3 font-weight-normal">Register new user</h1>
|
||||
{{ form(registrationForm) }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user