minor updates
This commit is contained in:
11
templates/security/check_email.html.twig
Normal file
11
templates/security/check_email.html.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Password Reset Email Sent{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>
|
||||
If an account matching your email exists, then an email was just sent that contains a link that you can use to reset your password.
|
||||
This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.
|
||||
</p>
|
||||
<p>If you don't receive an email please check your spam folder or <a href="{{ path('app_forgot_password_request') }}">try again</a>.</p>
|
||||
{% endblock %}
|
11
templates/security/confirmation_email.html.twig
Normal file
11
templates/security/confirmation_email.html.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
<h1>Hi! Please confirm your email!</h1>
|
||||
|
||||
<p>
|
||||
Please confirm your email address by clicking the following link: <br><br>
|
||||
<a href="{{ signedUrl }}">Confirm my Email</a>.
|
||||
This link will expire in {{ expiresAtMessageKey|trans(expiresAtMessageData, 'VerifyEmailBundle') }}.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Cheers!
|
||||
</p>
|
9
templates/security/email.html.twig
Normal file
9
templates/security/email.html.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
<h1>Hi!</h1>
|
||||
|
||||
<p>To reset your password, please visit the following link</p>
|
||||
|
||||
<a href="{{ url('app_reset_password', {token: resetToken.token}) }}">{{ url('app_reset_password', {token: resetToken.token}) }}</a>
|
||||
|
||||
<p>This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.</p>
|
||||
|
||||
<p>Cheers!</p>
|
@@ -3,40 +3,71 @@
|
||||
{% block title %}Log in!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<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.username }}, <a href="{{ path('app_logout') }}">Logout</a>
|
||||
{% 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>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="d-flex justify-content-center links">
|
||||
Don't have an account yet? <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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<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" autocomplete="username" required autofocus>
|
||||
<label for="inputPassword">Password</label>
|
||||
<input type="password" name="password" id="inputPassword" class="form-control" autocomplete="current-password" 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>
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
81
templates/security/register.html.twig
Normal file
81
templates/security/register.html.twig
Normal file
@@ -0,0 +1,81 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Register{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for flashError in app.flashes('verify_email_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-center h-100">
|
||||
<div class="card-header">
|
||||
<h3>Register</h3>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{{ form_start(registrationForm) }}
|
||||
|
||||
<div class="input-group form-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fas fa-user"></i></span>
|
||||
</div>
|
||||
{{ form_widget(registrationForm.username, {'attr': {'placeholder':'Username'}} ) }}
|
||||
</div>
|
||||
|
||||
<div class="input-group form-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
||||
</div>
|
||||
{{ form_widget(registrationForm.plainPassword, {'attr': {'placeholder':'Password'}} ) }}
|
||||
</div>
|
||||
|
||||
<div class="input-group form-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"></span>
|
||||
</div>
|
||||
{{ form_widget(registrationForm.firstName, {'attr': {'placeholder':'First Name'}} ) }}
|
||||
</div>
|
||||
|
||||
<div class="input-group form-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"></span>
|
||||
</div>
|
||||
{{ form_widget(registrationForm.lastName, {'attr': {'placeholder':'Last Name'}} ) }}
|
||||
</div>
|
||||
|
||||
<div class="input-group form-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fas fa-envelope-square"></i></span>
|
||||
</div>
|
||||
{{ form_widget(registrationForm.email, {'attr': {'placeholder':'eMail'}} ) }}
|
||||
</div>
|
||||
|
||||
{{ form_row(registrationForm.agreeTerms) }}
|
||||
|
||||
<button type="submit" class="submit-button">Register</button>
|
||||
{{ form_end(registrationForm) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="d-flex justify-content-center links">
|
||||
Already have an account? <a href=" {{ path('app_login') }}">Sign In!</a>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<a href="#">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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
22
templates/security/request.html.twig
Normal file
22
templates/security/request.html.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Reset your password{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for flashError in app.flashes('reset_password_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||
{% endfor %}
|
||||
<h1>Reset your password</h1>
|
||||
|
||||
{{ form_start(requestForm) }}
|
||||
{{ form_row(requestForm.email) }}
|
||||
<div>
|
||||
<small>
|
||||
Enter your email address and we we will send you a
|
||||
link to reset your password.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary">Send password reset email</button>
|
||||
{{ form_end(requestForm) }}
|
||||
{% endblock %}
|
12
templates/security/reset.html.twig
Normal file
12
templates/security/reset.html.twig
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Reset your password{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Reset your password</h1>
|
||||
|
||||
{{ form_start(resetForm) }}
|
||||
{{ form_row(resetForm.plainPassword) }}
|
||||
<button class="btn btn-primary">Reset password</button>
|
||||
{{ form_end(resetForm) }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user