feat: registration and password reset

This commit is contained in:
Björn Fromme
2024-12-03 16:08:06 +01:00
parent 8b796a8543
commit 3e59031ba9
10 changed files with 285 additions and 22 deletions
+3 -1
View File
@@ -3,7 +3,9 @@
hx-boost="true"
hx-indicator="#loading-indicator">
<div class="relative z-20 flex items-center justify-between pb-4">
<img class="h-8 w-auto" src="{{ asset('build/images/logo.svg') }}" alt="My E&amp;P Team">
<div class="text-3xl font-medium">
MyE&amp;P
</div>
{% if is_granted('ROLE_USER') %}
<div class="hidden lg:block">
{{ knp_menu_render(knp_menu_get('main')) }}
+26
View File
@@ -0,0 +1,26 @@
{% extends 'layout.html.twig' %}
{% block content %}
<div class="p-8 max-w-screen-sm border border-gray-300 rounded-md mx-auto">
<h2 class="text-2xl font-semibold pb-4">
Registrierung MyE&amp;P
</h2>
{{ form_start(form) }}
<div class="grid grid-cols-2 gap-x-8 gap-y-4 pb-4">
{{ form_row(form.firstName) }}
{{ form_row(form.name) }}
{{ form_row(form.gender) }}
{{ form_row(form.email) }}
</div>
<button type="submit" class="btn">
Absenden
</button>
<div class="pt-4">
<a href="{{ path('app_login') }}" class="underline">
zurück
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
{% endblock %}
+23
View File
@@ -0,0 +1,23 @@
{% extends 'layout.html.twig' %}
{% block content %}
<div class="p-8 max-w-screen-sm border border-gray-300 rounded-md mx-auto">
<h2 class="text-2xl font-semibold pb-4">
Passwort zurücksetzen
</h2>
{{ form_start(form) }}
<div class="pb-4">
{{ form_row(form.email) }}
</div>
<button type="submit" class="btn">
Absenden
</button>
<div class="pt-4">
<a href="{{ path('app_login') }}" class="underline">
zurück
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
{% endblock %}
+9 -1
View File
@@ -11,7 +11,7 @@
</div>
{% endif %}
<h2 class="text-2xl font-semibold pb-4">
Login MyE&amp;P
Login
</h2>
<form action="{{ path('app_login') }}" method="post">
<div class="mb-6">
@@ -47,6 +47,14 @@
<button type="submit" class="btn w-full">
Login
</button>
<div class="flex items-center space-x-2 pt-4">
<a href="{{ path('app_reset_password') }}" class="underline">
Passwort vergessen?
</a>
<a href="{{ path('app_registration') }}" class="underline">
Registrierung
</a>
</div>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
</form>
</div>