Skip to content

Commit

Permalink
[#2760] Corrected sidebar for when notifications are off
Browse files Browse the repository at this point in the history
  • Loading branch information
jiromaykin committed Sep 17, 2024
1 parent 72a58d5 commit 8c2b59f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/open_inwoner/accounts/views/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,18 @@ def stringify(
return (string_func(item) for item in items)

def get_context_data(self, **kwargs):
config = SiteConfiguration.get_solo()
context = super().get_context_data(**kwargs)
user = self.request.user
today = date.today()

context["anchors"] = [
("#personal-info", _("Persoonlijke gegevens")),
("#notifications", _("Voorkeuren voor meldingen")),
("#overview", _("Overzicht")),
("#profile-remove", _("Profiel verwijderen")),
]
if config.any_notifications_enabled:
context["anchors"][1] = ("#notifications", _("Voorkeuren voor meldingen"))

# Check if Laposta is configured and user has verified email
if LapostaConfig.get_solo().api_root and user.has_verified_email():
Expand Down

0 comments on commit 8c2b59f

Please sign in to comment.