Skip to content

Commit

Permalink
Fixed #805 -- implemented option 2 for Enschede
Browse files Browse the repository at this point in the history
  • Loading branch information
alextreme committed Sep 20, 2022
1 parent 6e3b4b7 commit 98c6ce7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<nav class="header__actions" aria-label="Zoek navigatie mobiel">
<div class="header__text-actions">
<p class="p">
{% trans "Welkom" %}
{% if request.user %}{{ request.user.get_full_name }}{% endif %}
{% if request.user.is_authenticated %}{% trans "Welkom" %} {{ request.user.get_full_name }}{% endif %}
</p>

{% if request.user.is_authenticated %}
Expand All @@ -26,7 +25,7 @@
{% link text=logout href=request.user.get_logout_url primary=True %}
</li>
</ul>
{% else %}
{% elif config.login_show %}
<ul class="header__list">
<li class="header__list-item">
{% url 'login' as login_url %}
Expand All @@ -51,8 +50,7 @@
<nav class="header__actions" aria-label="Zoek navigatie desktop">
<div class="header__text-actions">
<p class="p">
{% trans "Welkom" %}
{% if request.user %}{{ request.user.get_full_name }}{% endif %}
{% if request.user.is_authenticated %}{% trans "Welkom" %} {{ request.user.get_full_name }}{% endif %}
</p>

{% if request.user.is_authenticated %}
Expand All @@ -62,7 +60,7 @@
{% link text=logout href=request.user.get_logout_url primary=True %}
</li>
</ul>
{% else %}
{% elif config.login_show %}
<ul class="header__list">
<li class="header__list-item">
{% url 'login' as login_url %}
Expand Down
1 change: 1 addition & 0 deletions src/open_inwoner/configurations/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class SiteConfigurarionAdmin(OrderedInlineModelAdminMixin, SingletonModelAdmin):
{
"fields": (
"name",
"login_show",
"login_allow_registration",
"show_cases",
"show_product_finder",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.13 on 2022-09-20 18:35

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("configurations", "0019_auto_20220704_1002"),
]

operations = [
migrations.AddField(
model_name="siteconfiguration",
name="login_show",
field=models.BooleanField(
default=True,
help_text="Wanneer deze optie uit staat dan kan nog wel worden ingelogd via /accounts/login/ , echter het inloggen is verborgen",
verbose_name="Toon inlogknop rechts bovenin",
),
),
]
7 changes: 7 additions & 0 deletions src/open_inwoner/configurations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ class SiteConfiguration(SingletonModel):
related_name="hero_image_login",
help_text=_("Hero image on the login page"),
)
login_show = models.BooleanField(
verbose_name=_("Toon inlogknop rechts bovenin"),
default=True,
help_text=_(
"Wanneer deze optie uit staat dan kan nog wel worden ingelogd via /accounts/login/ , echter het inloggen is verborgen"
),
)
login_allow_registration = models.BooleanField(
verbose_name=_("Sta lokale registratie toe"),
default=False,
Expand Down

0 comments on commit 98c6ce7

Please sign in to comment.