refactored

This commit is contained in:
tracer 2022-04-11 17:50:23 +02:00
parent 23f613a067
commit 09461cefd8

View File

@ -1,73 +1,43 @@
{% extends 'base.html.twig' %}
{% block title %}Log in!{% endblock %}
{% block title %}Log In!{% endblock %}
{% block body %}
<div class="container box">
<div class="row">
<div class="login-form bg-dark mt-4 p-4">
<form method="post" class="row g-3">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
{% for flashError in app.flashes('verify_email_error') %}
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
{% endfor %}
<form method="post">
<div class="container">
<div class="d-flex justify-content-center h-100">
<div class="card-header">
<h3>Please Sign in</h3>
</div>
<div class="card">
<div class="card-body">
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-user"></i></span>
</div>
<input type="text" value="{{ last_username }}" name="username" id="inputUsername"
class="form-control" autocomplete="username" required autofocus>
{% if error is defined %}
error
<div class="alert-dark alert-danger">
{# {{ error.messageKey|trans(error.messageData, 'security') }} # #}
</div>
{% endif %}
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-key"></i></span>
</div>
<input type="password" name="password" id="inputPassword" class="form-control"
autocomplete="current-password" required>
</div>
{#
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 type="submit" class="submit-button">Sign In</button>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="col-12">
<label for="inputEmail">Username or eMail</label>
<input type="text" name="username" id="inputUsername" class="form-control" value="{{ last_username }}" required autofocus>
</div>
<div class="card-footer">
<div class="d-flex justify-content-center links">
Don't have an account yet? &nbsp;<a href=" {{ path('app_register') }}">Register!</a>
</div>
<div class="d-flex justify-content-center">
<a href="{{ path('app_forgot_password_request') }}">Forgot your password?</a>
</div>
<!--
<div class="d-flex justify-content-center social_icon">
<span><i class="fab fa-apple"></i></span>
<span><i class="fab fa-facebook"></i></span>
<span><i class="fab fa-google-plus"></i></span>
<span><i class="fab fa-twitter"></i></span>
</div>
-->
<div class="col-12">
<label for="inputPassword">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" required>
</div>
</div>
<div class="form-check mb-3">
<label>
<input type="checkbox" name="_remember_me" class="form-check-input">Remember me
</label>
</div>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="col-12">
<button class="btn btn-lg btn-primary float-end" type="submit">
Sign in
</button>
</div>
</form>
</div>
</div>
</form>
</div>
{% endblock %}