-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2187] Implemented email-verification
- Loading branch information
Bart van der Schoor
committed
Mar 28, 2024
1 parent
bd09926
commit 25d65f9
Showing
18 changed files
with
508 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/open_inwoner/accounts/migrations/0075_user_verified_email.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.2.11 on 2024-03-28 15:25 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("accounts", "0074_merge_20240228_1544"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="user", | ||
name="verified_email", | ||
field=models.EmailField( | ||
blank=True, default="", max_length=254, verbose_name="Verified email" | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/open_inwoner/accounts/templates/accounts/email_verification.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% extends 'master.html' %} | ||
{% load i18n static form_tags card_tags grid_tags solo_tags %} | ||
|
||
{% block content %} | ||
<div class="registration-grid"> | ||
{% render_grid %} | ||
{% render_column span=9 %} | ||
{% render_card tinted=True %} | ||
{% get_solo 'configurations.SiteConfiguration' as config %} | ||
<h1 class="h1">{% trans "E-mailadres bevestigen" %}</h1><br> | ||
{% if config.email_verification_text %}<p class="p">{{ config.email_verification_text|urlize|linebreaksbr }}</p><br>{% endif %} | ||
<form method="POST" id="email-verification-form" action="{{ request.get_full_path }}" class="form" novalidate> | ||
{% csrf_token %} | ||
{# {% for field in form.fields %}#} | ||
{# {% autorender_field form field %}#} | ||
{# {% endfor %}#} | ||
{% trans "Verficatie email verzenden" as button_text %} | ||
{% form_actions primary_icon='arrow_forward' primary_text=button_text %} | ||
</form> | ||
{% endrender_card %} | ||
{% endrender_column %} | ||
{% endrender_grid %} | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<p>Beste</p> | ||
<p>Om door te gaan moet je je email-adres <a href="{{ verification_link }}">bevestigen</a><span class="color--secondary"> →</span></p> | ||
<p>Mocht je geen behoefte hieraan hebben dan staat het je vrij om dit bericht te negeren </p> | ||
<p>Met vriendelijke groet, | ||
{{ site_name }} </p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...n_inwoner/configurations/migrations/0065_siteconfiguration_email_verification_required.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.2.11 on 2024-03-28 15:25 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("configurations", "0064_auto_20240304_1200"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="siteconfiguration", | ||
name="email_verification_required", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Whether to require users to verify their email address", | ||
verbose_name="Email verification required", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.