Skip to content

Commit dc37c9e

Browse files
committed
Update the registration screen
1 parent ba68370 commit dc37c9e

File tree

5 files changed

+539
-501
lines changed

5 files changed

+539
-501
lines changed

backend/donations/views/account_management.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from django.shortcuts import redirect, render
99
from django.urls import reverse
1010
from django.utils import timezone
11-
from django.utils.safestring import mark_safe
1211
from django.utils.translation import gettext_lazy as _
1312

1413
from redirectioneaza.common.messaging import send_email
@@ -92,12 +91,13 @@ def get(self, request, *args, **kwargs):
9291

9392
context = self.get_context_data(**kwargs)
9493

95-
signup_text: str = _("sign up")
96-
signup_link: str = request.build_absolute_uri(reverse("signup"))
97-
signup_url: str = f'<a href="{signup_link}">{signup_text}</a>'
98-
99-
# noinspection DjangoSafeString
100-
context.update({"signup_url": mark_safe(signup_url)})
94+
context.update(
95+
{
96+
"account_button": _("Go to account"),
97+
"section_title": _("Login through NGO Hub"),
98+
"form_action": reverse("amazon_cognito_login"),
99+
}
100+
)
101101

102102
return render(request, self.template_name, context)
103103

@@ -189,6 +189,15 @@ def get(self, request, *args, **kwargs):
189189

190190
context = self.get_context_data(**kwargs)
191191

192+
context.update(
193+
{
194+
"account_button": _("Register new account"),
195+
"account_button_is_external": True,
196+
"section_title": _("Register through NGO Hub"),
197+
"form_action": settings.NGOHUB_APP_BASE,
198+
}
199+
)
200+
192201
return render(request, self.template_name, context)
193202

194203
def post(self, request, *args, **kwargs):

0 commit comments

Comments
 (0)