From 06945b68c3f62c832c7734c6a1dcfb13ee5c6272 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Mon, 27 Dec 2021 09:13:02 +0100 Subject: [PATCH] nicer sign-up pages --- rowers/templates/confirmemailpage.html | 19 +++++++++++++++++++ rowers/templates/invalid_activation.html | 16 ++++++++++++++++ rowers/views/paymentviews.py | 10 ++++++---- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 rowers/templates/confirmemailpage.html create mode 100644 rowers/templates/invalid_activation.html diff --git a/rowers/templates/confirmemailpage.html b/rowers/templates/confirmemailpage.html new file mode 100644 index 00000000..7111f643 --- /dev/null +++ b/rowers/templates/confirmemailpage.html @@ -0,0 +1,19 @@ +{% extends "newbase.html" %} +{% load static %} +{% load rowerfilters %} + +{% block title %}Change Rower {% endblock %} + +{% block main %} +

Please confirm your email address

+ +

Please confirm your email address to complete your registration. An email has been sent to {{ address }}. + Please check the inbox in your email app. +If this is not a valid email address that you have access to, please repeat the new user registration process +with a valid email address.

+ +{% endblock %} + +{% block sidebar %} +{% include 'menu_profile.html' %} +{% endblock %} diff --git a/rowers/templates/invalid_activation.html b/rowers/templates/invalid_activation.html new file mode 100644 index 00000000..300aa40e --- /dev/null +++ b/rowers/templates/invalid_activation.html @@ -0,0 +1,16 @@ +{% extends "newbase.html" %} +{% load static %} +{% load rowerfilters %} + +{% block title %}Change Rower {% endblock %} + +{% block main %} +

Error

+ +

Your activation link is invalid. Please use a valid activation link that you received by email or try to register again as a new user.

+ +{% endblock %} + +{% block sidebar %} +{% include 'menu_profile.html' %} +{% endblock %} diff --git a/rowers/views/paymentviews.py b/rowers/views/paymentviews.py index a72bcc46..11a8c22d 100644 --- a/rowers/views/paymentviews.py +++ b/rowers/views/paymentviews.py @@ -790,7 +790,9 @@ def useractivate(request, uidb64, token): # pragma: no cover url+='?next=/rowers/me/teams' return HttpResponseRedirect(url) else: - return HttpResponse('Activation link is invalid!') + return render(request, + "invalid_activation.html", + {} ) @@ -870,12 +872,12 @@ def rower_register_view(request): mail_subject, message, to=[to_email] ) email.send() - return HttpResponse('Please confirm your email address to complete the registration') + return render(request,'confirmemailpage.html',{'address':to_email}) - login(request,theuser) + # login(request,theuser) - return HttpResponseRedirect(nextpage) + # return HttpResponseRedirect(nextpage) # '/rowers/register/thankyou/') else: # pragma: no cover