Skip to content

Commit

Permalink
Update the registration screen
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Dec 12, 2024
1 parent ba68370 commit dc37c9e
Show file tree
Hide file tree
Showing 5 changed files with 539 additions and 501 deletions.
23 changes: 16 additions & 7 deletions backend/donations/views/account_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from django.shortcuts import redirect, render
from django.urls import reverse
from django.utils import timezone
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _

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

context = self.get_context_data(**kwargs)

signup_text: str = _("sign up")
signup_link: str = request.build_absolute_uri(reverse("signup"))
signup_url: str = f'<a href="{signup_link}">{signup_text}</a>'

# noinspection DjangoSafeString
context.update({"signup_url": mark_safe(signup_url)})
context.update(
{
"account_button": _("Go to account"),
"section_title": _("Login through NGO Hub"),
"form_action": reverse("amazon_cognito_login"),
}
)

return render(request, self.template_name, context)

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

context = self.get_context_data(**kwargs)

context.update(
{
"account_button": _("Register new account"),
"account_button_is_external": True,
"section_title": _("Register through NGO Hub"),
"form_action": settings.NGOHUB_APP_BASE,
}
)

return render(request, self.template_name, context)

def post(self, request, *args, **kwargs):
Expand Down
Loading

0 comments on commit dc37c9e

Please sign in to comment.