|
8 | 8 | from django.shortcuts import redirect, render
|
9 | 9 | from django.urls import reverse
|
10 | 10 | from django.utils import timezone
|
11 |
| -from django.utils.safestring import mark_safe |
12 | 11 | from django.utils.translation import gettext_lazy as _
|
13 | 12 |
|
14 | 13 | from redirectioneaza.common.messaging import send_email
|
@@ -92,12 +91,13 @@ def get(self, request, *args, **kwargs):
|
92 | 91 |
|
93 | 92 | context = self.get_context_data(**kwargs)
|
94 | 93 |
|
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 | + ) |
101 | 101 |
|
102 | 102 | return render(request, self.template_name, context)
|
103 | 103 |
|
@@ -189,6 +189,15 @@ def get(self, request, *args, **kwargs):
|
189 | 189 |
|
190 | 190 | context = self.get_context_data(**kwargs)
|
191 | 191 |
|
| 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 | + |
192 | 201 | return render(request, self.template_name, context)
|
193 | 202 |
|
194 | 203 | def post(self, request, *args, **kwargs):
|
|
0 commit comments