From ae078e4f568003260c6eb7351ba2613ee2e914f0 Mon Sep 17 00:00:00 2001 From: Chantal Trutmann Date: Tue, 23 Jun 2026 15:26:49 +0200 Subject: [PATCH 1/2] Reorder recipient options --- .pre-commit-config.yaml | 2 +- src/onegov/feriennet/forms/notification_template.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58e3e8fec2..e420b622ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: exclude: .pre-commit-config.yaml - id: pt_structure - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.17 + rev: v0.15.18 hooks: - id: ruff-check args: [ "--fix" ] diff --git a/src/onegov/feriennet/forms/notification_template.py b/src/onegov/feriennet/forms/notification_template.py index 40e7fb0e20..95aacd47f6 100644 --- a/src/onegov/feriennet/forms/notification_template.py +++ b/src/onegov/feriennet/forms/notification_template.py @@ -74,6 +74,9 @@ class NotificationTemplateSendForm(Form): ('inactive_organisers', _( 'Organisers without occasions' )), + ('volunteers', _( + 'Volunteers' + )), ('by_role', _( 'Users of a given role' )), @@ -92,10 +95,7 @@ class NotificationTemplateSendForm(Form): ('by_occasion', _( 'Users with attenedees that have an occasion on their ' 'wish- or booking-list' - )), - (('volunteers', _( - 'Volunteers' - ))) + )) ], default='by_role' ) From c8d6401ac4639b2b3e42169828cfc77171e9366b Mon Sep 17 00:00:00 2001 From: Chantal Trutmann Date: Tue, 14 Jul 2026 12:56:54 +0200 Subject: [PATCH 2/2] Replace with dropdown --- src/onegov/feriennet/forms/notification_template.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/onegov/feriennet/forms/notification_template.py b/src/onegov/feriennet/forms/notification_template.py index 95aacd47f6..cbc7a0c2a5 100644 --- a/src/onegov/feriennet/forms/notification_template.py +++ b/src/onegov/feriennet/forms/notification_template.py @@ -13,7 +13,8 @@ from onegov.feriennet.layout import DefaultLayout from onegov.feriennet.models import NotificationTemplate from onegov.form import Form -from onegov.form.fields import MultiCheckboxField, HtmlField +from onegov.form.fields import (MultiCheckboxField, HtmlField, + TranslatedSelectField) from onegov.user import User, UserCollection from sqlalchemy import distinct, or_, and_, select, exists from uuid import uuid4 @@ -62,7 +63,7 @@ class NotificationTemplateSendForm(Form): request: FeriennetRequest - send_to = RadioField( + send_to = TranslatedSelectField( label=_('Send to'), choices=[ ('myself', _(