Skip to content

Commit f3c00f8

Browse files
committed
✨ [#1878] Add link to eHerkenning on register page
1 parent 531ad3b commit f3c00f8

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

src/open_inwoner/accounts/templates/django_registration/registration_form.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,25 @@
88
{% if digit_url %}
99
{% render_column start=5 span=5 %}
1010
{% render_card direction='horizontal' tinted=True %}
11-
<a href="{% url 'digid:login' %}" class="link digid-logo">
11+
<a href="{{ digit_url }}" class="link digid-logo">
1212
<img class="digid-logo__image" src="{% static 'accounts/digid_logo.svg' %}" alt="DigiD inlogpagina">
1313
</a>
1414
{% link bold=True href=digit_url text=_('Registreren met DigiD') secondary=True icon='arrow_forward' %}
1515
{% endrender_card %}
1616
{% endrender_column %}
1717
{% endif %}
1818

19+
{% if eherkenning_url %}
20+
{% render_column start=5 span=5 %}
21+
{% render_card direction='horizontal' tinted=True %}
22+
<a href="{{ eherkenning_url }}" class="link eherkenning-logo">
23+
<img class="eherkenning-logo__image" src="{% static 'accounts/eherkenning.png' %}" height=30 alt="eHerkenning inlogpagina">
24+
</a>
25+
{% link bold=True href=eherkenning_url text=_('Registreren met eHerkenning') secondary=True icon='arrow_forward' %}
26+
{% endrender_card %}
27+
{% endrender_column %}
28+
{% endif %}
29+
1930
{% if login_allow_registration %}
2031
{% render_column start=5 span=5 %}
2132
{% render_card tinted=True %}

src/open_inwoner/accounts/templates/registration/login.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 class="h1">{% trans 'Welkom' %}</h1>
3030
{% if eherkenning_enabled %}
3131
{% render_card direction='horizontal' tinted=True %}
3232
<a href="{% url 'eherkenning:login' %}" class="link eherkenning-logo">
33-
<img class="eherkenning-logo__image" src="{% static 'accounts/eherkenning.png' %}" height=40 alt="eHerkenning inlogpagina">
33+
<img class="eherkenning-logo__image" src="{% static 'accounts/eherkenning.png' %}" height=30 alt="eHerkenning inlogpagina">
3434
</a>
3535
{% url 'eherkenning:login' as href %}
3636
{% with href|addnexturl:next as href_with_next %}

src/open_inwoner/accounts/views/registration.py

+9
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ def get_context_data(self, **kwargs):
101101
)
102102
except:
103103
context["digit_url"] = ""
104+
105+
try:
106+
context["eherkenning_url"] = (
107+
furl(reverse("eherkenning:login"))
108+
.add({"next": necessary_fields_url})
109+
.url
110+
)
111+
except:
112+
context["eherkenning_url"] = ""
104113
return context
105114

106115
def get(self, request, *args, **kwargs):

0 commit comments

Comments
 (0)