Skip to content

Commit

Permalink
fixes for invite flow
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmegatelo committed Jul 17, 2024
1 parent 31a78c5 commit e87e2ab
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
10 changes: 10 additions & 0 deletions feed/templates/profile/invite_done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends 'layouts/centered.html' %}
{% load i18n %}

{% block main %}
<div class="centered-form-wrapper">
{% include 'blocks/page-heading.html' %}
<p class="paragraph">{% translate "Your account is ready to use. You may go ahead and sign in now." %}</p>
<a class="button" href="{{ login_url }}">{% translate 'Sign in' %}</a>
</div>
{% endblock %}
15 changes: 15 additions & 0 deletions feed/templates/profile/invite_password.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends 'layouts/centered.html' %}
{% load i18n %}
{% block main %}
<div class="centered-form-wrapper">
<div>
{% include 'blocks/page-heading.html' %}
<p class="paragraph">{% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}</p>
</div>
<form class="form" method="post">
{% csrf_token %}
{{ form.as_div }}
<button class="button form-submit" type="submit">{% translate 'Set my password' noop %}</button>
</form>
</div>
{% endblock %}
12 changes: 9 additions & 3 deletions feed/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@
),
path(
"profile/invite/<uidb64>/<token>/set_password",
anonym_required(PasswordResetConfirmView.as_view()),
anonym_required(PasswordResetConfirmView.as_view(
template_name='profile/invite_password.html',
success_url='/profile/invite/done'
)),
name="invite_accept_password"
),
path(
"profile/invite/<uidb64>/<token>/done",
anonym_required(PasswordResetCompleteView.as_view()),
"profile/invite/done",
anonym_required(PasswordResetCompleteView.as_view(
title='Welcome🥳',
template_name='profile/invite_done.html',
)),
name="invite_accept_complete"
),

Expand Down

0 comments on commit e87e2ab

Please sign in to comment.