finished user prfile and passwords

This commit is contained in:
2022-11-01 14:57:36 +01:00
parent a488e489da
commit 560e96cf18
61 changed files with 1581 additions and 852 deletions

View File

@@ -0,0 +1,22 @@
{% extends '@default/base.html.twig' %}
{% block title %}Reset your password{% endblock %}
{% block body %}
{% for flash_error in app.flashes('reset_password_error') %}
<div class="alert alert-danger" role="alert">{{ flash_error }}</div>
{% endfor %}
<h1>Reset your password</h1>
{{ form_start(requestForm) }}
{{ form_row(requestForm.account) }}
<div>
<small>
Enter your email address or your username and we will send you a
link to reset your password.
</small>
</div>
<button class="btn btn-primary float-end">Send password reset email</button>
{{ form_end(requestForm) }}
{% endblock %}

View File

@@ -0,0 +1,42 @@
{% extends '@default/base.html.twig' %}
{% block title %}Log In!{% endblock %}
{% block body %}
<div class="container rounded">
<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>
{% if error %}
<div class="alert-dark alert-danger">
{{ error.messageKey|trans(error.messageData, 'security') }}
</div>
{% endif %}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="col-12">
<label for="inputUsername">Username or eMail</label>
<input type="text" name="username" id="inputUsername"
class="form-control" {# value="{{ last_username }}" #} required autofocus>
</div>
<div class="col-12">
<label for="inputPassword">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" required>
</div>
<div class="form-check mb-3">
<label>
<input type="checkbox" name="_remember_me" class="form-check-input">Remember me
</label>
</div>
<button class="btn btn-lg btn-primary float-end" type="submit">
Sign in
</button>
</form>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,9 @@
<h1>Hi!</h1>
<p>To reset your password, please visit the following link</p>
<a href="{{ url('security_recovery_reset', {token: resetToken.token}) }}">Reset password</a>
<p>This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.</p>
<p>Cheers!</p>

View File

@@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" style="margin:0;padding:0;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<style type="text/css">
@media screen and (max-width: 599px) {
div {
max-width: 100% !important;
}
}
body {
background-color: #1e1f1e;
margin:25px;
padding:0;
}
</style>
</head>
<body>
<div style="border-collapse:collapse;border-spacing:0;">
<h1>Hi {{ username }}, please confirm your email!</h1>
<p>
Please confirm your email address by clicking the following link: <br><br>
<a href="{{ signedUrl|raw }}">Confirm my Email</a>.
<br>
This link will expire in {{ expiresAtMessageKey|trans(expiresAtMessageData, 'VerifyEmailBundle') }}.
</p>
<p>
Kind regards,
24unix.net
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,11 @@
{% extends '@default/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('security_forgot_password') }}">try again</a>.</p>
{% endblock %}

View File

@@ -0,0 +1,60 @@
{% extends '@default/base.html.twig' %}
{% form_theme registrationForm _self %}
{% block title %}Register{% endblock %}
{% block form_row %}
{%- set widget_attr = {} -%}
{%- if help is not empty -%}
{%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%}
{%- endif -%}
{{- form_label(form, null, {
label_attr: { class: 'sr-only' }
}) -}}
{{- form_errors(form) -}}
{{- form_widget(form, widget_attr) -}}
{{- form_help(form) -}}
{% endblock %}
{% block body %}
{% for flash_error in app.flashes('verify_email_error') %}
<div class="alert alert-danger" role="alert">{{ flash_error }}</div>
{% endfor %}
<div class="container rounded">
<div class="row">
<div class="login-form bg-dark mt-4 p-4">
<h1 class="h3 mb-3 font-weight-normal">Register</h1>
{{ form_start(registrationForm, {
attr: { class: 'form-signin' }
}) }}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
{{ form_row(registrationForm.username, {
attr: { placeholder: 'User name' }
}) }}
{{ form_row(registrationForm.email, {
attr: { placeholder: 'eMail' }
}) }}
{{ form_row(registrationForm.password.first, {
attr: { placeholder: 'Password'}
}) }}
{{ form_row(registrationForm.password.second, {
attr: { placeholder: 'Confirm password'}
}) }}
{{ form_row(registrationForm.agreeTerms) }}
<button type="submit" class="btn btn-primary float-end">Register</button>
{{ form_end(registrationForm) }}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,19 @@
{% extends '@default/base.html.twig' %}
{% block title %}Registration finished{% endblock %}
{% block body %}
<div class="container rounded">
<div class="row">
<div class="login-form bg-dark mt-4 p-4">
<h1 class="h3 mb-3 font-weight-normal">Registration finished</h1>
<p>You'll receive an email soon to confirm your identity.</p>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends '@default/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 %}