Initial commit
This commit is contained in:
37
templates/security/login.html.twig
Normal file
37
templates/security/login.html.twig
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<form method="post" style="color: white;">
|
||||
{% 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.username }}, <a href="{{ path('security_logout') }}">Logout</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
|
||||
<label for="inputUsername">Username</label>
|
||||
<input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control" required autofocus>
|
||||
<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') }}">
|
||||
|
||||
{#
|
||||
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
||||
See https://symfony.com/doc/current/security/remember_me.html
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
#}
|
||||
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
Sign in
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
20
templates/security/register.html.twig
Normal file
20
templates/security/register.html.twig
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{% for flashError in app.flashes('verify_email_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||
{% endfor %}
|
||||
<div style="color: white;">
|
||||
<h1>Register</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.username) }}
|
||||
{{ form_row(form.plainPassword, {
|
||||
label: 'Password'
|
||||
}) }}
|
||||
{{ form_row(form.agreeTerms) }}
|
||||
|
||||
<button type="submit" class="btn">Register</button>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user