From 639f14fc2e7b7ef4aa884a0e6971265dd39d0b18 Mon Sep 17 00:00:00 2001 From: Marco Morath Date: Thu, 26 Nov 2026 09:57:20 +0100 Subject: [PATCH] feature:Mail-Einladung --- README.md | 59 +- docs/datenschutz.md | 22 +- docs/sicherheit.md | 3 +- surveybox/accounts/audit.py | 2 + surveybox/forms/erasure.py | 5 +- surveybox/forms/evaluation.py | 5 +- surveybox/forms/history.py | 32 +- surveybox/forms/invitations.py | 414 ++++++++++ surveybox/forms/reminders.py | 59 +- surveybox/forms/retention.py | 3 + surveybox/forms/service.py | 48 +- surveybox/forms/subject_export.py | 27 + surveybox/forms/team.py | 2 +- surveybox/locale/de/LC_MESSAGES/messages.po | 403 ++++++++- surveybox/locale/en/LC_MESSAGES/messages.po | 400 ++++++++- surveybox/locale/fr/LC_MESSAGES/messages.po | 407 ++++++++-- surveybox/locale/messages.pot | 765 +++++++++++++----- surveybox/mail/custom.py | 4 +- surveybox/mail/notify.py | 14 +- .../migrations/versions/0019_invitations.py | 86 ++ surveybox/models/__init__.py | 2 + surveybox/models/forms.py | 52 +- surveybox/web/app.py | 5 + surveybox/web/routes/admin.py | 2 + surveybox/web/routes/admin_mail_templates.py | 1 + surveybox/web/routes/fill.py | 61 +- surveybox/web/routes/form_history.py | 11 +- surveybox/web/routes/form_invitations.py | 79 ++ surveybox/web/routes/forms.py | 17 +- surveybox/web/routes/invitation.py | 90 +++ surveybox/web/templates/fill_done.html | 1 + surveybox/web/templates/form_designer.html | 1 + surveybox/web/templates/form_invitations.html | 101 +++ surveybox/web/templates/form_settings.html | 19 +- surveybox/web/templates/invitation.html | 26 + surveybox/web/templates/mail/invitation.txt | 17 + surveybox/web/templates/mail/reminder.txt | 7 +- surveybox/worker.py | 6 +- tests/test_followups.py | 8 +- tests/test_invitations.py | 196 +++++ tests/test_invitations_units.py | 37 + tests/test_mail_units.py | 3 + tests/test_security_matrix.py | 1 + 43 files changed, 3017 insertions(+), 486 deletions(-) create mode 100644 surveybox/forms/invitations.py create mode 100644 surveybox/migrations/versions/0019_invitations.py create mode 100644 surveybox/web/routes/form_invitations.py create mode 100644 surveybox/web/routes/invitation.py create mode 100644 surveybox/web/templates/form_invitations.html create mode 100644 surveybox/web/templates/invitation.html create mode 100644 surveybox/web/templates/mail/invitation.txt create mode 100644 tests/test_invitations.py create mode 100644 tests/test_invitations_units.py diff --git a/README.md b/README.md index 574113a..ef26736 100644 --- a/README.md +++ b/README.md @@ -175,10 +175,14 @@ nicht erratbar. Wer ausfüllen darf, steht in den Einstellungen: | Zugriff | Anmeldung nötig | Hinweis | |---|---|---| | Alle angemeldeten Benutzer | ja | Erscheint auf deren Startseite | -| Ausgewählte Benutzer und Gruppen | ja | Erscheint auf deren Startseite; neue Gruppenmitglieder haben sofort Zugang | +| Nur Eingeladene (ausgewählte Benutzer und Gruppen, per E-Mail eingeladene Gäste) | ja, außer mit persönlichem Einladungslink | Erscheint auf deren Startseite; neue Gruppenmitglieder haben sofort Zugang | | Alle mit dem Link | nein | Gäste ohne Konto | | Link und Passwort | nein | Freischaltung gilt 12 Stunden; ein neues Passwort sperrt alte Freischaltungen | +Ein persönlicher Einladungslink (siehe *Einladungen und Erinnerungen*) öffnet +das Formular bei jeder Zugriffsart, ohne Anmeldung und ohne Passwort. Personen +in der Zugriffsliste kommen bei „Link und Passwort“ ohne Passwort hinein. + Bei anonymen Formularen speichert Surveybox die Antworten ohne Bezug zur Person. Damit angemeldete Benutzer trotzdem nur einmal teilnehmen, merkt es sich einen nicht umkehrbaren Prüfwert aus Formular und Benutzer. Die @@ -349,7 +353,8 @@ Adresse (Gäste nur die Ereignisse für Teilnehmende): | Enddatum erreicht | Eigentümer | | Folge-Mail eines Formulars (siehe unten) | Teilnehmende | | Gewählter Eintrag oder Termin gestrichen (Buchungen darauf entfallen) | Teilnehmende | -| Erinnerung vor dem Enddatum (je Formular einstellbar) | Eingeladene ohne Teilnahme | +| Einladung zu einem Formular (zum Einladungstermin) | Eingeladene | +| Erste und letzte Erinnerung (je Formular einstellbar) | Eingeladene ohne Teilnahme | | Tägliche Zusammenfassung neuer und geänderter Antworten (ab 7 Uhr) | Eigentümer und Mitbearbeitende | Alle sind voreingestellt an. Jede Person schaltet sie unter *Mein Konto → @@ -364,11 +369,51 @@ eigentliche Aktion; er steht im Log des Dienstes. Mails gehen in der Sprache des Profils, bei „wie mein Browser“ in der Standardsprache (`SURVEYBOX_DEFAULT_LANGUAGE`). -**Erinnerung.** In den Formulareinstellungen unter *Teilnahme*: so viele Tage -vor dem Enddatum (1 bis 30) erinnert Surveybox alle Personen der Zugriffsliste -(Benutzer und Gruppen samt Untergruppen), die noch nicht teilgenommen haben; -nur bei Zugriff „Ausgewählte Benutzer und Gruppen“ und mit Enddatum. Jede -Person einmal je Enddatum. +### Einladungen und Erinnerungen + +Im Designer unter *Einladungen* fügt man E-Mail-Adressen ein, auch als +kopierte Liste (Komma, Semikolon, Zeilen; „Erika Mustermann +“ geht ebenfalls). Ungültige Einträge bleiben im Feld +stehen, schon eingeladene Adressen werden nicht doppelt eingeladen. + +- **Adressen ohne Konto** werden *Gäste*: Jede bekommt einen persönlichen + Einladungslink. Er öffnet das Formular bei jeder Zugriffsart, ohne Anmeldung; + die Antwort gehört zur Einladung, die Eingangsbestätigung mit persönlichem + Link geht an die eingeladene Adresse. Nach der Teilnahme führt derselbe + Einladungslink zur eigenen Antwort (ansehen, ändern, löschen, soweit das + Formular es erlaubt). +- **Adressen vorhandener Konten** kommen in die Zugriffsliste und bekommen + eine Einladung mit dem normalen Link; sie nehmen angemeldet teil. +- **Zugriffsliste:** Mit „Personen und Gruppen der Zugriffsliste per E-Mail + einladen“ (bei neuen Formularen an) bekommen auch alle Personen der + Zugriffsliste eine Einladung, bei Gruppen samt Untergruppen; wer später in + eine Gruppe kommt, wird beim nächsten Lauf eingeladen. + +Termine in den Einstellungen unter *Einladungen und Erinnerungen*: + +| Termin | leer | sonst | +| --- | --- | --- | +| Einladungen versenden | sobald das Formular veröffentlicht und offen ist | zum angegebenen Zeitpunkt | +| Erste Erinnerung | keine | an Eingeladene ohne Teilnahme | +| Letzte Erinnerung | keine | an Eingeladene ohne Teilnahme | + +Die Termine liegen zwischen Beginn und Ende der Teilnahme, sofern gesetzt, und +in dieser Reihenfolge; sonst lehnt die Einstellungsseite sie ab. Erinnert +wird nur, wer vor dem Erinnerungstermin eingeladen wurde. Der Worker prüft +alle fünf Minuten; jede Mail geht höchstens einmal. Später hinzugefügte +Adressen werden beim nächsten Lauf eingeladen. + +Die Seite *Einladungen* zeigt je Person, wann eingeladen und erinnert wurde und +ob sie teilgenommen hat (bei anonymen Formularen nicht). Eine Einladung lässt +sich zurückziehen; ihr Link funktioniert dann nicht mehr, eine Antwort bleibt. +Gäste bestellen über einen Link in jeder Mail weitere Mails ab oder löschen +die Einladung samt Adresse; Personen mit Konto schalten Einladungen und +Erinnerungen in ihrem Konto ab. + +Beim Update auf diese Version wird die frühere Einstellung „… Tage vor dem +Ende erinnern“ zur letzten Erinnerung, wenn dieser Zeitpunkt noch bevorsteht. +Bestehende Formulare laden ihre Zugriffsliste nicht automatisch ein (Haken +in den Einstellungen setzen, wenn gewünscht). ### Eigene Mail-Vorlagen diff --git a/docs/datenschutz.md b/docs/datenschutz.md index d2e486b..8380b29 100644 --- a/docs/datenschutz.md +++ b/docs/datenschutz.md @@ -14,11 +14,11 @@ oder seinem Datenschutzbeauftragten. | Bezeichnung | Durchführung von Umfragen, Anmeldungen und Terminabstimmungen mit Surveybox | | Zwecke | Formulare erstellen und auswerten; Teilnahme an Umfragen, Abstimmungen und Schichtplänen; Benachrichtigung der Teilnehmenden (Bestätigung, Warteliste, Erinnerung, Folge-Mails); Verwaltung von Benutzerkonten und Gruppen | | Betroffene | Benutzer mit Konto (Administratoren, Ersteller, Teilnehmende); Gäste ohne Konto; eingeladene Personen; in Antworten genannte Personen | -| Datenkategorien | Konto: Name, E-Mail-Adresse, Sprache, Rolle, Gruppen, Passwort-Hash (Argon2id), Passkey-Schlüssel (öffentlich), verschlüsseltes TOTP-Geheimnis, Sitzungen. Gäste: optional E-Mail-Adresse, Hash des persönlichen Links. Antworten: Inhalte nach Formular, ggf. Teilnehmer-Name, hochgeladene Dateien, Zeitpunkte. Kommentare. Protokoll: Ereignis, Zeitpunkt, handelnde Person (keine IP-Adressen). Zähler gegen Missbrauch (Anmeldung, Uploads, Mails): pseudonymisierte IP bzw. Adresse, nur für das jeweilige Zeitfenster. Mail-Warteschlange: Empfänger, Art, verschlüsselter Inhalt | +| Datenkategorien | Konto: Name, E-Mail-Adresse, Sprache, Rolle, Gruppen, Passwort-Hash (Argon2id), Passkey-Schlüssel (öffentlich), verschlüsseltes TOTP-Geheimnis, Sitzungen. Gäste: optional E-Mail-Adresse, Hash des persönlichen Links. Einladungen: eingeladene E-Mail-Adresse bzw. Konto, Zeitpunkte von Einladung, Erinnerungen und Teilnahme, Abmeldung. Antworten: Inhalte nach Formular, ggf. Teilnehmer-Name, hochgeladene Dateien, Zeitpunkte. Kommentare. Protokoll: Ereignis, Zeitpunkt, handelnde Person (keine IP-Adressen). Zähler gegen Missbrauch (Anmeldung, Uploads, Mails): pseudonymisierte IP bzw. Adresse, nur für das jeweilige Zeitfenster. Mail-Warteschlange: Empfänger, Art, verschlüsselter Inhalt | | Besondere Kategorien (Art. 9) | Keine vorgesehen. Wer Formulare mit solchen Fragen erstellt (z. B. Gesundheit, Unverträglichkeiten), prüft das je Formular und markiert die Fragen als personenbezogen | | Empfänger | Innerhalb der Organisation: Verwalter und Auswertende des jeweiligen Formulars. Auftragsverarbeiter: [Betreiber des SMTP-Relays], [Hoster/Rechenzentrum, falls nicht selbst betrieben] | | Drittland | Keine Übermittlung durch Surveybox. [Prüfen: SMTP-Relay, Hoster] | -| Löschfristen | Antworten: Löschfrist je Formular (Standard [730] Tage nach Ende), danach anonymisieren oder löschen; Konten: bis zur Löschung durch Admin oder Person selbst; Gast-Adressen ohne Bestätigung: 7 Tage; Protokoll: `SURVEYBOX_AUDIT_RETENTION_DAYS` (Standard 365 Tage); Mail-Warteschlange: nach Versand ohne Inhalt; Verlauf der Formulare (Stände mit Antworten zum punktuellen Wiederherstellen): [90] Tage, höchstens bis zum Ende der Löschfrist des Formulars; Papierkorb gelöschter Formulare: [14] Tage; Sicherungen: täglich `SURVEYBOX_BACKUP_KEEP_DAILY` Stück, Löschjournal sorgt nach dem Zurückspielen für erneutes Löschen | +| Löschfristen | Antworten: Löschfrist je Formular (Standard [730] Tage nach Ende), danach anonymisieren oder löschen; Konten: bis zur Löschung durch Admin oder Person selbst; Gast-Adressen ohne Bestätigung: 7 Tage; Protokoll: `SURVEYBOX_AUDIT_RETENTION_DAYS` (Standard 365 Tage); Mail-Warteschlange: nach Versand ohne Inhalt; Einladungen: bis zur Löschfrist des Formulars, mit dem Formular oder auf Wunsch der eingeladenen Person (Link in jeder Mail); Verlauf der Formulare (Stände mit Antworten zum punktuellen Wiederherstellen): [90] Tage, höchstens bis zum Ende der Löschfrist des Formulars; Papierkorb gelöschter Formulare: [14] Tage; Sicherungen: täglich `SURVEYBOX_BACKUP_KEEP_DAILY` Stück, Löschjournal sorgt nach dem Zurückspielen für erneutes Löschen | | TOM | Siehe Abschnitt 3 und `docs/sicherheit.md` | ## 2. Rechtsgrundlagen (Anhaltspunkte) @@ -73,6 +73,18 @@ Ohne https (nur zum Testen) entfällt das Präfix `__Host-`. Anfragen, die nicht über die Oberfläche gehen, beantwortet [Stelle] innerhalb eines Monats; Auskunft und Löschung erledigt ein Administrator wie oben. +### Einladungen per E-Mail + +Wer Adressen einfügt, verantwortet, dass er die Personen einladen darf (etwa +Mitglieder, Teilnehmende einer Veranstaltung). Surveybox schickt je Adresse +höchstens eine Einladung und zwei Erinnerungen zu den eingestellten Terminen, +jede Mail mit einem Link zum Abbestellen und zum Löschen der Einladung samt +Adresse. Die Einladungsliste mit dem Teilnahmestand sehen Eigentümer, +Mitbearbeitende und Administratoren; bei anonymen Formularen wird der +Teilnahmestand nicht angezeigt und nie mit einer Antwort verknüpft. Einladungen +entfallen mit der Löschfrist des Formulars, mit dem Formular und beim Löschen +der Person (Konto oder Gast-Adresse); die Auskunft (Art. 15) enthält sie. + ### Verlauf und Papierkorb Stände sind Kopien des Formulars mit seinen Antworten. Sie dienen der @@ -105,7 +117,11 @@ gezielt zurücknehmen, ohne eine Komplettsicherung einzuspielen. Regeln: > Formularen speichern wir keinen Bezug zu Ihrer Person. Geben Sie als Gast > Ihre E-Mail-Adresse an, senden wir Ihnen eine Bestätigung mit einem > persönlichen Link; weitere Mails erhalten Sie nur, wenn Sie Ihre Adresse -> bestätigen. Unbestätigte Adressen löschen wir nach 7 Tagen. +> bestätigen. Unbestätigte Adressen löschen wir nach 7 Tagen. Laden wir Sie per +> E-Mail ein, speichern wir Ihre Adresse, den Zeitpunkt von Einladung und +> Erinnerungen und ob Sie teilgenommen haben, bis zum Ablauf der Löschfrist des +> Formulars; über den Link in jeder Mail können Sie weitere Mails abbestellen +> oder die Einladung samt Adresse löschen. > > Zweck ist die Durchführung und Auswertung des jeweiligen Formulars; > Rechtsgrundlage ist [Art. 6 Abs. 1 lit. … DSGVO]. Die Antworten sehen nur die diff --git a/docs/sicherheit.md b/docs/sicherheit.md index 80eca48..09615fd 100644 --- a/docs/sicherheit.md +++ b/docs/sicherheit.md @@ -13,7 +13,7 @@ ausgefüllt. | V1 | Architektur | Ein Image für Web und Worker, PostgreSQL, Volume `/data`; keine externen Dienste außer SMTP-Relay | Review | | V2 | Authentisierung | Argon2id; Passkeys (WebAuthn); TOTP mit Wiederherstellungscodes; zweiter Faktor Pflicht für Administratoren; Sperre nach Fehlversuchen; Begrenzung je IP und Konto; „Passwort vergessen“ antwortet immer gleich | `test_accounts`, `test_passkeys_groups`, `test_mail` | | V3 | Sitzungen | Zufällige Sitzungs-ID (serverseitig), Cookie `__Host-…` mit `Secure`, `HttpOnly`, `SameSite=Lax`; Leerlauf- und Höchstdauer; Abmelden auf allen Geräten; neue Sitzung nach Anmeldung | `test_accounts`, `test_security_matrix` | -| V4 | Zugriffskontrolle | Jede Anfrage prüft Rolle, Gruppe und Freigabe auf dem Server; Formular-IDs, Links und Tokens sind zufällig (UUID bzw. 128 Bit und mehr); Verlauf nur ab Mitbearbeitung, Papierkorb nur für Eigentümer, Löschende, Gruppen- und Instanz-Admins | `test_security_matrix` (alle Routen), `test_group_scope`, `test_media_team`, `test_history` | +| V4 | Zugriffskontrolle | Jede Anfrage prüft Rolle, Gruppe und Freigabe auf dem Server; Formular-IDs, Links und Tokens sind zufällig (UUID bzw. 128 Bit und mehr); Einladungslinks sind mit HMAC signiert (128 Bit) und gelten nur für ihr Formular, ihr Zugang hängt an einem Cookie nur für dieses Formular; Verlauf nur ab Mitbearbeitung, Papierkorb nur für Eigentümer, Löschende, Gruppen- und Instanz-Admins | `test_security_matrix` (alle Routen), `test_group_scope`, `test_media_team`, `test_history` | | V5 | Eingaben und Ausgaben | Typisierte Prüfung (FastAPI/Pydantic und eigene Prüfungen je Fragetyp); SQL nur über SQLAlchemy mit Parametern; Jinja mit automatischem Escaping; Mail- und Gestaltungsvorlagen ohne ausführbare Syntax; Exporte entschärfen Formeln (CSV), schreiben Text immer als Text (XLSX, ODS) und maskieren PDF-Markup | `test_question_types`, `test_xlsx_units`, `test_phase8c_units`, `test_mail_custom_units` | | V6 | Kryptografie | Geheimnisse aus `SURVEYBOX_SECRET_KEY` abgeleitet (HKDF je Zweck); TOTP-Geheimnisse und SMTP-Passwort verschlüsselt; Mail-Inhalte in der Warteschlange verschlüsselt | `test_security_units`, `test_mail` | | V7 | Fehler und Protokoll | Keine Stacktraces an Benutzer; Protokoll für Anmeldungen, Admin-Aktionen, Exporte, Löschungen, ohne Antwortinhalte; Aufbewahrung `SURVEYBOX_AUDIT_RETENTION_DAYS` | `test_audit_actions` | @@ -105,6 +105,7 @@ produktive Instanz. | 26.11.2026 | Testinstanz | ZAP Baseline | bestanden | 0 FAIL, 61 PASS, 6 WARN – alle bewertet, siehe unten | | 26.11.2026 | Testinstanz, 2 Web-Prozesse | Lasttest (95 %) | bestanden | 20 gleichzeitige Abrufe, je 100: `/` 142 ms, `/login` 169 ms, `/f/` 179 ms; einzeln ~30 ms; ~270 Abrufe/s | | 26.11.2026 | Testinstanz | Update mit Daten | bestanden mit Bemerkung | Neues Image (Debian-Updates, ohne pip) auf bestehende Daten: „Datenbank ist aktuell (0017_response_note)“, Formulare, Antworten, Gestaltung und Anmeldung unverändert. Kein Schemawechsel seit 0017; Migrationen mit Daten bei den Phasen-Updates erfolgt. Voller Weg mit `OLD_IMAGE` und Sicherung vor dem Update beim nächsten Release mit Migration | +| 26.11.2026 | Testinstanz | Update mit Migration | bestanden | Update von 0017_response_note auf 0018_form_history mit bestehenden Daten: Sicherung vor dem Update automatisch angelegt (`pre-upgrade/…-from-0017_response_note-to-0018_form_history.dump`), danach „Datenbank ist aktuell (0018_form_history)“; Verlauf, Papierkorb, Kontosperre und alle bisherigen Daten auf der Testinstanz geprüft. Damit ist die Bemerkung zum Update-Test erledigt | | 26.11.2026 | Testinstanz | Wiederherstellung | bestanden | Manuelle Sicherung zurückgespielt: Stand der Sicherung vollständig (Formulare, Antworten, Medien, Gestaltung, Anmeldung); nach der Sicherung angelegtes Formular entfernt; nach der Sicherung gelöschtes Konto blieb durch das Löschjournal gelöscht | | 26.11.2026 | Testinstanz | Stichproben | bestanden mit Bemerkung | Sperre nach Fehlversuchen greift, Meldung verrät nichts, „Zu viele Versuche“ je Adresse; fremde Formulare und Antworten nicht erreichbar; umbenannte Dateien abgelehnt. Bemerkung: Die Sperre war in der Benutzerverwaltung nicht zu sehen; ergänzt (Anzeige „vorübergehend gesperrt“, Grund und Ende, Aufheben durch Admins, `test_accounts`) | diff --git a/surveybox/accounts/audit.py b/surveybox/accounts/audit.py index 4339911..0898cf6 100644 --- a/surveybox/accounts/audit.py +++ b/surveybox/accounts/audit.py @@ -74,6 +74,8 @@ ACTIONS = { "form.trash_restored", "admin.history_changed", "admin.user_unlocked", + "form.invitations_added", + "form.invitation_removed", } diff --git a/surveybox/forms/erasure.py b/surveybox/forms/erasure.py index b3ea7a4..b0ff002 100644 --- a/surveybox/forms/erasure.py +++ b/surveybox/forms/erasure.py @@ -248,7 +248,10 @@ def erase_guest( ) -> Summary: """Alles, was an einer Gast-Adresse hängt: Antworten, Versandstand, Mailprotokoll.""" now = now or datetime.now(UTC) - history.scrub_guest(db, contact.id, f"g:{contact.public_id}") + from surveybox.forms import invitations + + history.scrub_guest(db, contact.id, f"g:{contact.public_id}", contact.email) + invitations.delete_for_email(db, contact.email) summary = erase_responses(db, settings, _guest_responses(db, contact), now) db.execute(delete(FollowupDelivery).where( FollowupDelivery.recipient == f"g:{contact.public_id}")) diff --git a/surveybox/forms/evaluation.py b/surveybox/forms/evaluation.py index 9c431e3..9e2e9d7 100644 --- a/surveybox/forms/evaluation.py +++ b/surveybox/forms/evaluation.py @@ -140,14 +140,13 @@ def participant_names(db: Session, rows: Sequence[Response]) -> dict[int, str]: def pending_invited(db: Session, form: Form) -> list[UserAccount]: - """Eingeladene (Zugriff "Ausgewählte Benutzer und Gruppen") ohne Antwort, nach Name. + """Eingeladene Konten (Zugriffsliste) ohne Antwort, nach Name. Bei anonymen Formularen nie: wer teilgenommen hat, bleibt dort offen. """ from surveybox.forms import reminders - from surveybox.models import FormAccess - if form.anonymous or form.access != FormAccess.RESTRICTED: + if form.anonymous: return [] answered = set(db.scalars(select(Response.user_id).where( Response.form_id == form.id, Response.user_id.is_not(None)))) diff --git a/surveybox/forms/history.py b/surveybox/forms/history.py index f7c4dd1..61f4d66 100644 --- a/surveybox/forms/history.py +++ b/surveybox/forms/history.py @@ -70,7 +70,8 @@ REASONS = EDIT_REASONS | {"daily", "before_restore", "deleted"} # Tabellen eines Formulars, ausgewählt über die Spalte form_id (form: id) ... BY_FORM = ("form", "form_access", "form_member", "question", "response", "booking", - "media_file", "comment", "form_participation", "followup", "form_mute") + "media_file", "comment", "form_participation", "followup", "form_mute", + "form_invitation") # ... über die Antworten ... BY_RESPONSE = ("answer", "response_note") # ... und über die Folge-Mails @@ -78,11 +79,12 @@ BY_FOLLOWUP = ("followup_document", "followup_delivery") # Nur im Stand beim Löschen (Papierkorb): punktuell lässt sich daraus nichts # zurückholen, also werden sie sonst nicht aufbewahrt (Datensparsamkeit) TRASH_ONLY = frozenset({"comment", "form_participation", "followup", "form_mute", - "followup_document", "followup_delivery"}) + "followup_document", "followup_delivery", "form_invitation"}) # Reihenfolge beim Einfügen (Fremdschlüssel) INSERT_ORDER = ("form", "form_access", "form_member", "question", "response", "answer", "booking", "media_file", "response_note", "comment", "form_participation", - "followup", "followup_document", "followup_delivery", "form_mute") + "followup", "followup_document", "followup_delivery", "form_mute", + "form_invitation") # Antworten und was dazugehört (fürs Entprellen) DATA_TABLES = frozenset({"response", "answer", "booking", "response_note", "form_participation", "followup_delivery"}) @@ -92,7 +94,8 @@ DATA_TABLES = frozenset({"response", "answer", "booking", "response_note", SETTINGS = ("title", "description", "opens_at", "closes_at", "access", "link_password_hash", "allow_multiple", "allow_edit", "guest_email", "results_visibility", "retention_days", "deletion_mode", "privacy_notice", "require_consent", - "consent_text", "slot_names", "slots_max_per_person", "reminder_days", + "consent_text", "slot_names", "slots_max_per_person", "invite_at", "remind_first_at", + "remind_last_at", "invite_accounts", "calendar_mode", "comments_mode", "comments_anonymous", "reply_to", "comments_notify", "group_id") QUESTION_FIELDS = ("label", "help_text", "required", "personal") @@ -284,7 +287,7 @@ def _people(payload: Payload) -> tuple[list[int], list[int]]: for name, column in (("response", "user_id"), ("comment", "user_id"), ("form_access", "user_id"), ("form_member", "user_id"), ("form", "owner_id"), ("form_mute", "user_id"), - ("response_note", "author_id")): + ("response_note", "author_id"), ("form_invitation", "user_id")): users.update(int(r[column]) for r in payload.rows(name) if r.get(column) is not None) guests = {int(r["guest_contact_id"]) for r in payload.rows("response") if r.get("guest_contact_id") is not None} @@ -1044,7 +1047,7 @@ def scrub_user(db: Session, user_id: int, recipient: str, def change(payload: Payload) -> bool: ids = {r["id"] for r in payload.rows("response") if r.get("user_id") == user_id} changed = _drop_responses(payload, ids) - for name in ("form_access", "form_member", "form_mute"): + for name in ("form_access", "form_member", "form_mute", "form_invitation"): changed |= _drop_rows(payload, name, lambda r: r.get("user_id") != user_id) changed |= _drop_rows(payload, "followup_delivery", lambda r: r.get("recipient") != recipient) @@ -1072,22 +1075,35 @@ def scrub_user(db: Session, user_id: int, recipient: str, db.flush() -def scrub_guest(db: Session, guest_id: int, recipient: str) -> None: - """Gelöschte Gast-Adresse aus allen Ständen entfernen.""" +def scrub_guest(db: Session, guest_id: int, recipient: str, email: str = "") -> None: + """Gelöschte Gast-Adresse aus allen Ständen entfernen (Einladungen an diese + Adresse stehen nur im Stand beim Löschen, also im Papierkorb).""" def change(payload: Payload) -> bool: ids = {r["id"] for r in payload.rows("response") if r.get("guest_contact_id") == guest_id} changed = _drop_responses(payload, ids) changed |= _drop_rows(payload, "followup_delivery", lambda r: r.get("recipient") != recipient) + if email: + changed |= _drop_rows(payload, "form_invitation", lambda r: r.get("email") != email) return changed for snapshot in db.scalars(select(FormSnapshot).where( FormSnapshot.guest_ids.contains([guest_id]))): _rewrite(snapshot, change) + if email: + scrub_invitee(db, email) db.flush() +def scrub_invitee(db: Session, email: str) -> None: + """Eingeladene Adresse aus dem Papierkorb entfernen (nur dort stehen Einladungen).""" + trash = select(FormTrash.snapshot_id) + for snapshot in db.scalars(select(FormSnapshot).where(FormSnapshot.id.in_(trash))): + _rewrite(snapshot, lambda p: _drop_rows( + p, "form_invitation", lambda r: r.get("email") != email)) + + def purge_owner_trash(db: Session, user_id: int) -> None: """Gelöschte Person: ihre Formulare im Papierkorb entfallen wie ihre übrigen.""" for form_id in list(db.scalars(select(FormTrash.form_id) diff --git a/surveybox/forms/invitations.py b/surveybox/forms/invitations.py new file mode 100644 index 0000000..f94da66 --- /dev/null +++ b/surveybox/forms/invitations.py @@ -0,0 +1,414 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +"""Einladungen zu einem Formular per E-Mail, mit Erinnerungen. + +Eingeladen werden +- Gäste: E-Mail-Adressen ohne Konto. Jede bekommt einen persönlichen + Einladungslink; er öffnet das Formular bei jeder Zugriffsart (auch bei + "Nur Eingeladene"), ohne Anmeldung und ohne Passwort. Die Antwort wird der + Einladung zugeordnet; nach der Teilnahme führt derselbe Link zur eigenen + Antwort (persönlicher Link wie bei Gästen). +- Konten: Adressen bekannter Konten kommen in die Zugriffsliste und bekommen + eine Einladung mit dem normalen Link (Teilnahme mit Anmeldung). Ist + "Zugriffsliste einladen" gesetzt, bekommen alle Personen der Zugriffsliste + (auch über Gruppen) eine Einladung. + +Termine je Formular: Einladung (leer: sobald das Formular offen ist), erste und +letzte Erinnerung (leer: keine). Sie liegen im Teilnahmezeitraum. Erinnert wird, +wer vor dem Erinnerungstermin eingeladen wurde und noch nicht teilgenommen hat. +Gäste können sich über einen Link in jeder Mail abmelden. + +Bei anonymen Formularen wird nur vermerkt, dass ein Gast teilgenommen hat +(für die Erinnerungen), nie welche Antwort; Verwalter sehen den Stand nicht. + +Einladungen gehören zum Formular: Sie entfallen mit dessen Löschfrist, mit dem +Formular und mit der Person (Konto oder Gast-Adresse). +""" + +from __future__ import annotations + +import base64 +import binascii +import re +import uuid +from dataclasses import dataclass, field +from datetime import UTC, datetime, timedelta + +from sqlalchemy import delete, select +from sqlalchemy.orm import Session + +from surveybox.accounts.service import email_valid, normalize_email +from surveybox.models import ( + Form, + FormAccessEntry, + FormInvitation, + FormStatus, + Response, + UserAccount, +) +from surveybox.security.tokens import constant_time_equal, derive_key, keyed_hash +from surveybox.settings import Settings + +MAX_PER_PASTE = 500 +MAX_PER_FORM = 5000 +COOKIE_AGE = timedelta(hours=12) +_SPLIT = re.compile(r"[,;\s]+") +_STRIP = "<>()[]\"'" + + +class InvitationError(ValueError): + def __init__(self, code: str) -> None: + super().__init__(code) + self.code = code + + +# -------------------------------------------------------------------------- +# Termine +# -------------------------------------------------------------------------- + + +def check_schedule(opens_at: datetime | None, closes_at: datetime | None, + invite_at: datetime | None, first: datetime | None, + last: datetime | None) -> str | None: + """Fehlercode, wenn die Termine nicht zusammenpassen, sonst None.""" + for value in (invite_at, first, last): + if value is None: + continue + if opens_at is not None and value < opens_at: + return "schedule_before_open" + if closes_at is not None and value >= closes_at: + return "schedule_after_close" + if first is not None and last is not None and last <= first: + return "schedule_order" + for reminder in (first, last): + if invite_at is not None and reminder is not None and reminder <= invite_at: + return "schedule_reminder_before_invite" + return None + + +# -------------------------------------------------------------------------- +# Einladungslink +# -------------------------------------------------------------------------- + + +def _b64(data: bytes) -> str: + return base64.urlsafe_b64encode(data).decode("ascii").rstrip("=") + + +def _unb64(text: str) -> bytes: + return base64.urlsafe_b64decode(text + "=" * (-len(text) % 4)) + + +def _mac(secret_key: str, public_id: uuid.UUID) -> bytes: + return keyed_hash(derive_key(secret_key, "invitation"), str(public_id))[:16] + + +def token_for(secret_key: str, invitation: FormInvitation) -> str: + """Link-Schlüssel: Kennung der Einladung und Signatur. Er muss nirgends gespeichert + werden; mit dem Löschen der Einladung wird er wertlos.""" + return f"{_b64(invitation.public_id.bytes)}.{_b64(_mac(secret_key, invitation.public_id))}" + + +def find_by_token(db: Session, secret_key: str, token: str) -> FormInvitation | None: + if not token or len(token) > 100 or "." not in token: + return None + raw, _, mac = token.partition(".") + try: + public_id = uuid.UUID(bytes=_unb64(raw)) + given = _unb64(mac) + except (binascii.Error, ValueError): + return None + if not constant_time_equal(_mac(secret_key, public_id), given): + return None + invitation = db.scalar(select(FormInvitation).where(FormInvitation.public_id == public_id)) + return invitation if invitation is not None and invitation.email is not None else None + + +def link_url(settings: Settings, invitation: FormInvitation) -> str: + token = token_for(settings.secret_key.get_secret_value(), invitation) + return f"{settings.public_origin}/i/{token}" + + +def stop_url(settings: Settings, invitation: FormInvitation) -> str: + token = token_for(settings.secret_key.get_secret_value(), invitation) + return f"{settings.public_origin}/mail/invitation/{token}" + + +def cookie_name(form: Form) -> str: + return f"surveybox_inv_{form.id}" + + +def from_cookie(db: Session, secret_key: str, form: Form, + value: str | None) -> FormInvitation | None: + """Einladung aus dem Cookie, das /i/ setzt (nur für dieses Formular).""" + invitation = find_by_token(db, secret_key, value or "") + return invitation if invitation is not None and invitation.form_id == form.id else None + + +def participated(invitation: FormInvitation) -> bool: + return invitation.participated_at is not None + + +def mark_participated(form: Form, invitation: FormInvitation, response: Response, + now: datetime | None = None) -> None: + invitation.participated_at = now or datetime.now(UTC) + if not form.anonymous: + invitation.response_id = response.id + + +# -------------------------------------------------------------------------- +# Adressen hinzufügen +# -------------------------------------------------------------------------- + + +def parse_addresses(raw: str) -> tuple[list[str], list[str]]: + """Adressen aus eingefügtem Text (Komma, Semikolon, Zeilen; auch "Name "). + Ergebnis: gültige Adressen (normalisiert, ohne Doppelte), ungültige Einträge.""" + valid: list[str] = [] + invalid: list[str] = [] + for part in _SPLIT.split(raw or ""): + token = part.strip(_STRIP) + if "@" not in token: + continue # Namensteile wie "Erika" in "Erika Muster " + address = normalize_email(token) + if email_valid(address): + if address not in valid: + valid.append(address) + elif token not in invalid: + invalid.append(token[:100]) + return valid, invalid + + +@dataclass +class Added: + guests: list[str] = field(default_factory=list) + accounts: list[str] = field(default_factory=list) + already: list[str] = field(default_factory=list) + inactive: list[str] = field(default_factory=list) + invalid: list[str] = field(default_factory=list) + + @property + def total(self) -> int: + return len(self.guests) + len(self.accounts) + + +def add(db: Session, form: Form, raw: str, actor: UserAccount) -> Added: + """Adressen einladen. Konten kommen in die Zugriffsliste, alle anderen werden Gäste. + Versendet wird später (Worker), zum Einladungstermin.""" + valid, invalid = parse_addresses(raw) + if not valid and not invalid: + raise InvitationError("addresses_missing") + if len(valid) > MAX_PER_PASTE: + raise InvitationError("too_many_at_once") + rows = list(db.scalars(select(FormInvitation).where(FormInvitation.form_id == form.id))) + if len(rows) + len(valid) > MAX_PER_FORM: + raise InvitationError("too_many") + emails = {r.email for r in rows if r.email} + user_rows = {r.user_id for r in rows if r.user_id} + listed = set(db.scalars(select(FormAccessEntry.user_id).where( + FormAccessEntry.form_id == form.id, FormAccessEntry.user_id.is_not(None)))) + accounts = {u.email: u for u in db.scalars( + select(UserAccount).where(UserAccount.email.in_(valid)))} if valid else {} + result = Added(invalid=invalid) + for address in valid: + user = accounts.get(address) + if user is not None: + if not user.is_active: + result.inactive.append(address) + continue + if user.id not in listed: + db.add(FormAccessEntry(form_id=form.id, user_id=user.id)) + listed.add(user.id) + if user.id in user_rows: + result.already.append(address) + continue + db.add(FormInvitation(form_id=form.id, user_id=user.id, created_by=actor.id)) + user_rows.add(user.id) + result.accounts.append(address) + elif address in emails: + result.already.append(address) + else: + db.add(FormInvitation(form_id=form.id, email=address, created_by=actor.id)) + emails.add(address) + result.guests.append(address) + db.flush() + return result + + +def remove(db: Session, form: Form, public_id: str) -> bool: + """Einladung zurückziehen; der Link funktioniert danach nicht mehr. Eine + Antwort bleibt. Konten bleiben in der Zugriffsliste (dort entfernen).""" + try: + pid = uuid.UUID(public_id) + except ValueError: + return False + row = db.scalar(select(FormInvitation).where( + FormInvitation.public_id == pid, FormInvitation.form_id == form.id)) + if row is None: + return False + db.delete(row) + return True + + +# -------------------------------------------------------------------------- +# Übersicht für Verwalter +# -------------------------------------------------------------------------- + + +@dataclass +class Row: + invitation: FormInvitation + address: str + name: str + account: bool + participated: bool | None # None: nicht angezeigt (anonymes Formular) + + +def overview(db: Session, secret_key: str, form: Form) -> list[Row]: + from surveybox.forms.service import has_participated + + found = [] + users = {u.id: u for u in db.scalars(select(UserAccount).where(UserAccount.id.in_( + select(FormInvitation.user_id).where(FormInvitation.form_id == form.id))))} + for row in db.scalars(select(FormInvitation).where(FormInvitation.form_id == form.id) + .order_by(FormInvitation.created_at, FormInvitation.id)): + if row.user_id is not None: + user = users.get(row.user_id) + if user is None: + continue + took_part = has_participated(db, secret_key, form, user) + found.append(Row(row, user.email, user.display_name, True, + None if form.anonymous else took_part)) + else: + found.append(Row(row, row.email or "", "", False, + None if form.anonymous else participated(row))) + return found + + +# -------------------------------------------------------------------------- +# Versand (Worker) +# -------------------------------------------------------------------------- + + +def _closes_text(form: Form, settings: Settings, language: str) -> str: + if form.closes_at is None: + return "" + from babel.dates import format_datetime + + text: str = format_datetime(form.closes_at.astimezone(settings.tz), format="medium", + locale=language) + return text + + +def _send(db: Session, settings: Settings, form: Form, row: FormInvitation, + user: UserAccount | None, kind: str, stage: str) -> bool: + from surveybox.mail import notify + + if user is not None: + language = notify.language_of(user, settings) + return notify.send( + db, settings, user, kind=kind, form=form, + event="invitation" if kind == "invitation" else "reminder", + context={"link": notify.form_link(settings, form), "invited_guest": False, + "closes": _closes_text(form, settings, language)}, + dedupe_key=f"invitation:{form.id}:u{user.id}:{stage}", + ) + language = settings.default_language + recipient = notify.Recipient(row.email or "", "", language) + return notify.send( + db, settings, recipient, kind=kind, form=form, + context={"link": link_url(settings, row), "invited_guest": True, + "closes": _closes_text(form, settings, language), + "stop_link": stop_url(settings, row)}, + dedupe_key=f"invitation:{form.id}:{row.public_id}:{stage}", + unsubscribe_url=stop_url(settings, row), + ) + + +def run_due(db: Session, settings: Settings, now: datetime) -> int: + """Fällige Einladungen und Erinnerungen in die Warteschlange legen.""" + from surveybox.forms.service import FillState, fill_state + + sent = 0 + forms = db.scalars(select(Form).where( + Form.is_template.is_(False), Form.status == FormStatus.OPEN)).all() + for form in forms: + if fill_state(form, now) == FillState.OPEN: + sent += _run_form(db, settings, form, now) + return sent + + +def _run_form(db: Session, settings: Settings, form: Form, now: datetime) -> int: + from surveybox.forms import reminders + from surveybox.forms.service import has_participated + + secret = settings.secret_key.get_secret_value() + rows = list(db.scalars(select(FormInvitation).where(FormInvitation.form_id == form.id))) + invite_due = form.invite_at is None or form.invite_at <= now + reminder_due = any(at is not None and at <= now + for at in (form.remind_first_at, form.remind_last_at)) + if not rows and not reminder_due and not (invite_due and form.invite_accounts): + return 0 + invited = {u.id: u for u in reminders.invited(db, form)} + if (invite_due and form.invite_accounts) or reminder_due: + # Personen der Zugriffsliste (auch über Gruppen) bekommen eine Zeile + have = {r.user_id for r in rows if r.user_id is not None} + for user_id in invited.keys() - have: + row = FormInvitation(form_id=form.id, user_id=user_id) + db.add(row) + rows.append(row) + db.flush() + + def took_part(row: FormInvitation) -> bool: + if row.user_id is None: + return participated(row) + user = invited.get(row.user_id) + return user is not None and has_participated(db, secret, form, user) + + sent = 0 + if invite_due: + for row in rows: + if row.sent_at is not None or row.unsubscribed_at is not None: + continue + user = invited.get(row.user_id) if row.user_id is not None else None + reminder_only = not form.invite_accounts and row.created_by is None + if row.user_id is not None and (user is None or reminder_only): + continue # nicht (mehr) eingeladen oder nur für Erinnerungen + if not took_part(row) and _send(db, settings, form, row, user, + "invitation", "invite"): + sent += 1 + row.sent_at = now + for stage, at in (("first", form.remind_first_at), ("last", form.remind_last_at)): + if at is None or at > now: + continue + attr = f"reminded_{stage}_at" + for row in rows: + if getattr(row, attr) is not None or row.unsubscribed_at is not None: + continue + user = invited.get(row.user_id) if row.user_id is not None else None + if row.user_id is not None and user is None: + continue + if row.sent_at is not None and row.sent_at >= at: + continue # erst nach dem Termin eingeladen + if row.user_id is None and row.sent_at is None: + continue # Gast noch nicht eingeladen + if not took_part(row) and _send(db, settings, form, row, user, "reminder", stage): + sent += 1 + setattr(row, attr, now) + return sent + + +# -------------------------------------------------------------------------- +# Löschen +# -------------------------------------------------------------------------- + + +def delete_for_form(db: Session, form_id: int) -> None: + db.execute(delete(FormInvitation).where(FormInvitation.form_id == form_id)) + + +def delete_for_email(db: Session, email: str) -> None: + db.execute(delete(FormInvitation).where(FormInvitation.email == normalize_email(email))) + + +def stop(invitation: FormInvitation, now: datetime | None = None) -> None: + invitation.unsubscribed_at = invitation.unsubscribed_at or now or datetime.now(UTC) diff --git a/surveybox/forms/reminders.py b/surveybox/forms/reminders.py index 95c7ed9..d562098 100644 --- a/surveybox/forms/reminders.py +++ b/surveybox/forms/reminders.py @@ -1,27 +1,15 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -"""Erinnerung vor dem Enddatum an Eingeladene, die noch nicht teilgenommen haben. - -Eingeladen sind die Personen der Zugriffsliste eines Formulars mit Zugriff -"Ausgewählte Benutzer und Gruppen" (Gruppen samt Untergruppen). Der Ersteller -legt je Formular fest, wie viele Tage vor dem Enddatum erinnert wird; ohne -Angabe gibt es keine Erinnerung. Jede Person bekommt sie höchstens einmal je -Enddatum. +"""Eingeladene Konten: die Personen der Zugriffsliste eines Formulars (Gruppen +samt Untergruppen). Einladungen und Erinnerungen verschickt forms.invitations. """ from __future__ import annotations -from datetime import datetime, timedelta - from sqlalchemy import select from sqlalchemy.orm import Session from surveybox.accounts import scope -from surveybox.forms.service import FillState, fill_state, has_participated -from surveybox.mail import notify -from surveybox.models import Form, FormAccess, FormAccessEntry, FormStatus, UserAccount -from surveybox.settings import Settings - -MAX_DAYS = 30 +from surveybox.models import Form, FormAccessEntry, UserAccount def invited(db: Session, form: Form) -> list[UserAccount]: @@ -41,44 +29,3 @@ def invited(db: Session, form: Form) -> list[UserAccount]: .where(UserAccount.id.in_(ids), UserAccount.is_active.is_(True)) .order_by(UserAccount.id) )) - - -def _closes_text(form: Form, settings: Settings, language: str) -> str: - from babel.dates import format_datetime - - assert form.closes_at is not None # noqa: S101 - vom Aufrufer geprüft - text: str = format_datetime(form.closes_at.astimezone(settings.tz), format="medium", - locale=language) - return text - - -def run_due(db: Session, settings: Settings, now: datetime) -> int: - secret = settings.secret_key.get_secret_value() - forms = db.scalars( - select(Form).where( - Form.is_template.is_(False), - Form.status == FormStatus.OPEN, - Form.access == FormAccess.RESTRICTED, - Form.reminder_days.is_not(None), - Form.closes_at > now, - ) - ).all() - sent = 0 - for form in forms: - assert form.closes_at is not None and form.reminder_days is not None # noqa: S101 - if now < form.closes_at - timedelta(days=form.reminder_days): - continue - if fill_state(form, now) != FillState.OPEN: - continue - for user in invited(db, form): - if has_participated(db, secret, form, user): - continue - if notify.send( - db, settings, user, kind="reminder", event="reminder", form=form, - context={"link": notify.form_link(settings, form), - "closes": _closes_text(form, settings, - notify.language_of(user, settings))}, - dedupe_key=f"reminder:{form.id}:{form.closes_at.isoformat()}:{user.id}", - ): - sent += 1 - return sent diff --git a/surveybox/forms/retention.py b/surveybox/forms/retention.py index 0bc7d72..b4a9304 100644 --- a/surveybox/forms/retention.py +++ b/surveybox/forms/retention.py @@ -192,7 +192,10 @@ def delete_responses(db: Session, response_ids: list[int]) -> int: def _clear_form_traces(db: Session, form: Form, mode: str) -> None: """Merker, Versandstand und Kommentar-Autoren des Formulars entfernen.""" + from surveybox.forms import invitations + db.execute(delete(FormParticipation).where(FormParticipation.form_id == form.id)) + invitations.delete_for_form(db, form.id) # Einladungen samt Adressen db.execute(delete(FollowupDelivery).where(FollowupDelivery.followup_id.in_( select(Followup.id).where(Followup.form_id == form.id)))) if mode == MODE_DELETE: diff --git a/surveybox/forms/service.py b/surveybox/forms/service.py index 285e238..1c9d148 100644 --- a/surveybox/forms/service.py +++ b/surveybox/forms/service.py @@ -137,6 +137,7 @@ def create_form( owner_id=owner.id, share_token=new_token(16), group_id=group.id if group is not None else None, + invite_accounts=True, ) if restricted_to_group and group is not None: form.access = FormAccess.RESTRICTED @@ -289,17 +290,19 @@ def update_settings( form.slots_max_per_person = max_places else: form.slots_max_per_person = None - raw_days = _first(fields, "reminder_days").strip() - if raw_days: - try: - days = int(raw_days) - except ValueError as exc: - raise FormError("reminder_days_invalid") from exc - if not 1 <= days <= 30: - raise FormError("reminder_days_invalid") - form.reminder_days = days - else: - form.reminder_days = None + from surveybox.forms import invitations + + invite_at = _local_datetime(_first(fields, "invite_at"), tz) + remind_first_at = _local_datetime(_first(fields, "remind_first_at"), tz) + remind_last_at = _local_datetime(_first(fields, "remind_last_at"), tz) + problem = invitations.check_schedule(opens_at, closes_at, invite_at, remind_first_at, + remind_last_at) + if problem: + raise FormError(problem) + form.invite_at = invite_at + form.remind_first_at = remind_first_at + form.remind_last_at = remind_last_at + form.invite_accounts = _first(fields, "invite_accounts") == "on" form.privacy_notice = _text(fields, "privacy_notice", MAX_TEXT) form.require_consent = _first(fields, "require_consent") == "on" form.consent_text = _text(fields, "consent_text", 1000) @@ -348,12 +351,17 @@ def set_access_entries( group_ids = set( db.scalars(select(UserGroup.id).where(UserGroup.public_id.in_(parse(group_public_ids)))) ) + existing = list(db.scalars(select(FormAccessEntry).where(FormAccessEntry.form_id == form.id))) if found is not None and not found.global_creator: - # Gruppenersteller: nur eigene Gruppen und deren Mitglieder + # Gruppenersteller: nur eigene Gruppen und deren Mitglieder. Einträge außerhalb + # (etwa per E-Mail eingeladene Konten) sehen sie nicht und behalten sie deshalb. group_ids &= set(found.creating) allowed_users = {u.id for u in scope.users_in_groups(db, found.creating)} user_ids &= allowed_users - existing = list(db.scalars(select(FormAccessEntry).where(FormAccessEntry.form_id == form.id))) + user_ids |= {e.user_id for e in existing + if e.user_id is not None and e.user_id not in allowed_users} + group_ids |= {e.group_id for e in existing + if e.group_id is not None and e.group_id not in set(found.creating)} for entry in existing: db.delete(entry) db.flush() @@ -594,6 +602,20 @@ def fill_access( return FillAccess.FORBIDDEN +def fill_access_for( + db: Session, form: Form, user: UserAccount | None, password_ok: bool, invited: bool +) -> FillAccess: + """Wie fill_access; eine Einladung (persönlicher Link) oder ein Eintrag in der + Zugriffsliste öffnet das Formular bei jeder Zugriffsart.""" + if invited: + return FillAccess.OK + access = fill_access(db, form, user, password_ok) + if access == FillAccess.PASSWORD and user is not None and user_in_access_list( + db, form, user): + return FillAccess.OK + return access + + def open_forms_for(db: Session, user: UserAccount) -> list[Form]: """Offene Formulare, die der Benutzer ausfüllen darf (für die Startseite).""" groups = scope.member_groups(db, user.id) diff --git a/surveybox/forms/subject_export.py b/surveybox/forms/subject_export.py index bbc17b3..b5ecd2b 100644 --- a/surveybox/forms/subject_export.py +++ b/surveybox/forms/subject_export.py @@ -104,6 +104,31 @@ def _followups(db: Session, recipient: str) -> list[dict[str, Any]]: for delivery, followup, form in rows] +def _invitations(db: Session, condition: Any) -> list[dict[str, Any]]: + from surveybox.models import FormInvitation + + rows = db.execute( + select(FormInvitation, Form).join(Form, Form.id == FormInvitation.form_id) + .where(condition).order_by(FormInvitation.created_at) + ).all() + return [{"form": form.title, "invited_at": _iso(inv.sent_at), + "reminded_at": [_iso(t) for t in (inv.reminded_first_at, inv.reminded_last_at) if t], + "no_more_emails": inv.unsubscribed_at is not None} + for inv, form in rows] + + +def _invitation_user(user_id: int) -> Any: + from surveybox.models import FormInvitation + + return FormInvitation.user_id == user_id + + +def _invitation_email(email: str) -> Any: + from surveybox.models import FormInvitation + + return FormInvitation.email == email + + def _mail_log(rows: list[MailMessage]) -> list[dict[str, Any]]: return [{"kind": m.kind, "status": m.status, "created_at": _iso(m.created_at), "sent_at": _iso(m.sent_at)} for m in rows] @@ -171,6 +196,7 @@ def for_user(db: Session, user: UserAccount, tz: ZoneInfo) -> dict[str, Any]: "own_forms": [{"id": str(f.public_id), "title": f.title, "status": f.status, "created_at": _iso(f.created_at)} for f in owned], "followup_emails": _followups(db, f"u:{user.public_id}"), + "invitations": _invitations(db, _invitation_user(user.id)), "email_log": _mail_log(mails), "activity_log": [{"action": e.action, "at": _iso(e.occurred_at)} for e in audit], }) @@ -192,6 +218,7 @@ def for_guest(db: Session, contact: GuestContact, tz: ZoneInfo) -> dict[str, Any }, "responses": _responses(db, responses, tz), "followup_emails": _followups(db, f"g:{contact.public_id}"), + "invitations": _invitations(db, _invitation_email(contact.email)), "email_log": _mail_log(mails), }) diff --git a/surveybox/forms/team.py b/surveybox/forms/team.py index 1ddd019..0fdc39a 100644 --- a/surveybox/forms/team.py +++ b/surveybox/forms/team.py @@ -198,7 +198,7 @@ COPIED_FIELDS = ( "comments_anonymous", "comments_notify", "reply_to", - "reminder_days", + "invite_accounts", ) diff --git a/surveybox/locale/de/LC_MESSAGES/messages.po b/surveybox/locale/de/LC_MESSAGES/messages.po index 2ca34c1..e599a77 100644 --- a/surveybox/locale/de/LC_MESSAGES/messages.po +++ b/surveybox/locale/de/LC_MESSAGES/messages.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Surveybox VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-11-26 09:14+0100\n" +"POT-Creation-Date: 2026-11-26 09:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -178,9 +178,9 @@ msgstr "Nachname" #: surveybox/forms/export.py surveybox/forms/types.py surveybox/web/templates/_fill_fields.html #: surveybox/web/templates/account.html surveybox/web/templates/admin_group_edit.html #: surveybox/web/templates/admin_user_new.html surveybox/web/templates/admin_users.html -#: surveybox/web/templates/forgot.html surveybox/web/templates/guest_links.html -#: surveybox/web/templates/login.html surveybox/web/templates/question_edit.html -#: surveybox/web/templates/register.html +#: surveybox/web/templates/forgot.html surveybox/web/templates/form_invitations.html +#: surveybox/web/templates/guest_links.html surveybox/web/templates/login.html +#: surveybox/web/templates/question_edit.html surveybox/web/templates/register.html msgid "Email address" msgstr "E-Mail-Adresse" @@ -262,7 +262,7 @@ msgstr "alle" msgid "Answer filter" msgstr "Antwortfilter" -#: surveybox/forms/export.py +#: surveybox/forms/export.py surveybox/web/templates/form_invitations.html msgid "none" msgstr "keiner" @@ -297,7 +297,8 @@ msgstr "Einfachauswahl (gleiche Antwortmöglichkeiten)" #: surveybox/forms/pdf_export.py surveybox/web/templates/account.html #: surveybox/web/templates/admin_group_edit.html surveybox/web/templates/admin_groups.html #: surveybox/web/templates/admin_user_edit.html surveybox/web/templates/admin_user_new.html -#: surveybox/web/templates/admin_users.html surveybox/web/templates/register.html +#: surveybox/web/templates/admin_users.html surveybox/web/templates/form_invitations.html +#: surveybox/web/templates/register.html msgid "Name" msgstr "Name" @@ -589,9 +590,13 @@ msgstr "Termin in einer Abstimmung bestätigt" msgid "Chosen entry or date removed" msgstr "Gewählter Eintrag oder Termin entfernt" +#: surveybox/mail/custom.py surveybox/mail/notify.py +msgid "Invitation to a form" +msgstr "Einladung zu einem Formular" + #: surveybox/mail/custom.py -msgid "Reminder before the end date" -msgstr "Erinnerung vor dem Enddatum" +msgid "Reminder to invited people" +msgstr "Erinnerung an Eingeladene" #: surveybox/mail/custom.py surveybox/web/routes/admin_mail.py msgid "Comment published" @@ -661,6 +666,10 @@ msgstr "Anmeldeseite" msgid "settings of the form" msgstr "Einstellungen des Formulars" +#: surveybox/mail/custom.py +msgid "link to stop emails about an invitation (guests only)" +msgstr "Link, um keine Mails mehr zu einer Einladung zu bekommen (nur Gäste)" + #: surveybox/mail/custom.py msgid "greeting, e.g. “Hello Erika,”" msgstr "Anrede, z. B. „Hallo Erika,“" @@ -698,12 +707,12 @@ msgstr "Der Text muss {details} oder diese Platzhalter enthalten: %(names)s" #: surveybox/mail/custom.py surveybox/web/templates/mail/changed.txt #: surveybox/web/templates/mail/comment_new.txt surveybox/web/templates/mail/comment_published.txt #: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/mail/deadline.txt -#: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/invite.txt -#: surveybox/web/templates/mail/participation.txt surveybox/web/templates/mail/password_reset.txt -#: surveybox/web/templates/mail/promoted.txt surveybox/web/templates/mail/register.txt -#: surveybox/web/templates/mail/register_exists.txt surveybox/web/templates/mail/reminder.txt -#: surveybox/web/templates/mail/retention_notice.txt surveybox/web/templates/mail/slot_full.txt -#: surveybox/web/templates/mail/test.txt +#: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/invitation.txt +#: surveybox/web/templates/mail/invite.txt surveybox/web/templates/mail/participation.txt +#: surveybox/web/templates/mail/password_reset.txt surveybox/web/templates/mail/promoted.txt +#: surveybox/web/templates/mail/register.txt surveybox/web/templates/mail/register_exists.txt +#: surveybox/web/templates/mail/reminder.txt surveybox/web/templates/mail/retention_notice.txt +#: surveybox/web/templates/mail/slot_full.txt surveybox/web/templates/mail/test.txt #, python-format msgid "Hello %(name)s," msgstr "Hallo %(name)s," @@ -713,12 +722,12 @@ msgstr "Hallo %(name)s," #: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/mail/deadline.txt #: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/guest_erase.txt #: surveybox/web/templates/mail/guest_export.txt surveybox/web/templates/mail/guest_links.txt -#: surveybox/web/templates/mail/guest_receipt.txt surveybox/web/templates/mail/invite.txt -#: surveybox/web/templates/mail/participation.txt surveybox/web/templates/mail/password_reset.txt -#: surveybox/web/templates/mail/promoted.txt surveybox/web/templates/mail/register.txt -#: surveybox/web/templates/mail/register_exists.txt surveybox/web/templates/mail/reminder.txt -#: surveybox/web/templates/mail/retention_notice.txt surveybox/web/templates/mail/slot_full.txt -#: surveybox/web/templates/mail/test.txt +#: surveybox/web/templates/mail/guest_receipt.txt surveybox/web/templates/mail/invitation.txt +#: surveybox/web/templates/mail/invite.txt surveybox/web/templates/mail/participation.txt +#: surveybox/web/templates/mail/password_reset.txt surveybox/web/templates/mail/promoted.txt +#: surveybox/web/templates/mail/register.txt surveybox/web/templates/mail/register_exists.txt +#: surveybox/web/templates/mail/reminder.txt surveybox/web/templates/mail/retention_notice.txt +#: surveybox/web/templates/mail/slot_full.txt surveybox/web/templates/mail/test.txt msgid "Hello," msgstr "Hallo," @@ -747,8 +756,8 @@ msgid "An entry or date I chose has been removed from a form" msgstr "Ein Eintrag oder Termin, den ich gewählt hatte, wurde gestrichen" #: surveybox/mail/notify.py -msgid "Reminder before the end date of a form I was invited to" -msgstr "Erinnerung vor dem Enddatum eines Formulars, zu dem ich eingeladen bin" +msgid "Reminder about a form I was invited to" +msgstr "Erinnerung an ein Formular, zu dem ich eingeladen wurde" #: surveybox/mail/notify.py msgid "New comments on forms I manage" @@ -1140,6 +1149,14 @@ msgstr "Einstellungen zu Verlauf und Papierkorb geändert" msgid "Lock of an account lifted" msgstr "Sperre eines Kontos aufgehoben" +#: surveybox/web/routes/admin.py +msgid "People invited to a form by email" +msgstr "Personen per E-Mail zu einem Formular eingeladen" + +#: surveybox/web/routes/admin.py +msgid "Invitation withdrawn" +msgstr "Einladung zurückgezogen" + #: surveybox/web/routes/admin.py msgid "Account deleted" msgstr "Konto gelöscht" @@ -1220,7 +1237,7 @@ msgstr "Bitte speichern Sie zuerst die Einstellungen des Relays." msgid "Test message" msgstr "Testnachricht" -#: surveybox/web/routes/admin_mail.py +#: surveybox/web/routes/admin_mail.py surveybox/web/templates/invitation.html msgid "Invitation" msgstr "Einladung" @@ -1575,9 +1592,21 @@ msgstr "Eingetragene Namen anzeigen" msgid "Places per person across all participation fields (empty: no limit)" msgstr "Plätze je Person über alle Teilnahme-Felder (leer: unbegrenzt)" +#: surveybox/web/routes/form_history.py +msgid "Send invitations" +msgstr "Einladungen versenden" + +#: surveybox/web/routes/form_history.py surveybox/web/templates/form_invitations.html +msgid "First reminder" +msgstr "Erste Erinnerung" + +#: surveybox/web/routes/form_history.py surveybox/web/templates/form_invitations.html +msgid "Last reminder" +msgstr "Letzte Erinnerung" + #: surveybox/web/routes/form_history.py surveybox/web/templates/form_settings.html -msgid "Remind invited people who have not taken part yet … days before the end (empty: no reminder)" -msgstr "Eingeladene ohne Teilnahme … Tage vor dem Ende erinnern (leer: keine Erinnerung)" +msgid "Invite the people and groups of the access list by email" +msgstr "Personen und Gruppen der Zugriffsliste per E-Mail einladen" #: surveybox/web/routes/form_history.py surveybox/web/templates/form_settings.html msgid "Confirmed dates as calendar" @@ -1620,6 +1649,18 @@ msgstr "Dieses Formular lässt sich nicht mehr wiederherstellen." msgid "Restored from the form history (state of %(date)s)." msgstr "Aus dem Verlauf wiederhergestellt (Stand vom %(date)s)." +#: surveybox/web/routes/form_invitations.py +msgid "Please paste at least one email address." +msgstr "Bitte fügen Sie mindestens eine E-Mail-Adresse ein." + +#: surveybox/web/routes/form_invitations.py +msgid "At most 500 addresses at once." +msgstr "Höchstens 500 Adressen auf einmal." + +#: surveybox/web/routes/form_invitations.py +msgid "A form can have at most 5000 invitations." +msgstr "Ein Formular kann höchstens 5000 Einladungen haben." + #: surveybox/web/routes/form_results.py msgid "Please describe why you change this answer." msgstr "Bitte beschreiben Sie, warum Sie diese Antwort ändern." @@ -1766,8 +1807,20 @@ msgid "Please enter a valid reply-to address (without a name)." msgstr "Bitte geben Sie eine gültige Antwort-an-Adresse ein (ohne Namen)." #: surveybox/web/routes/forms.py -msgid "The reminder must be between 1 and 30 days before the end." -msgstr "Die Erinnerung muss zwischen 1 und 30 Tagen vor dem Ende liegen." +msgid "Invitations and reminders cannot be before the start of participation." +msgstr "Einladungen und Erinnerungen können nicht vor dem Beginn der Teilnahme liegen." + +#: surveybox/web/routes/forms.py +msgid "Invitations and reminders must be before the end of participation." +msgstr "Einladungen und Erinnerungen müssen vor dem Ende der Teilnahme liegen." + +#: surveybox/web/routes/forms.py +msgid "The last reminder must come after the first reminder." +msgstr "Die letzte Erinnerung muss nach der ersten liegen." + +#: surveybox/web/routes/forms.py +msgid "Reminders must come after the invitations." +msgstr "Erinnerungen müssen nach den Einladungen liegen." #: surveybox/web/routes/forms.py msgid "“All signed-in users” is reserved for instance-wide roles. Choose groups or a link." @@ -1796,8 +1849,8 @@ msgid "All signed-in users" msgstr "Alle angemeldeten Benutzer" #: surveybox/web/routes/forms.py -msgid "Selected users and groups" -msgstr "Ausgewählte Benutzer und Gruppen" +msgid "Only invited people: selected users and groups, guests invited by email" +msgstr "Nur Eingeladene: ausgewählte Benutzer und Gruppen, per E-Mail eingeladene Gäste" #: surveybox/web/routes/forms.py msgid "Anyone with the link, also without an account" @@ -3872,6 +3925,10 @@ msgstr "Dieses Formular ist geschlossen. Es können keine Antworten mehr abgegeb msgid "You have already filled in this form." msgstr "Sie haben dieses Formular bereits ausgefüllt." +#: surveybox/web/templates/fill_done.html +msgid "Open the link from your invitation again to view your answer." +msgstr "Öffnen Sie den Link aus Ihrer Einladung erneut, um Ihre Antwort anzusehen." + #: surveybox/web/templates/fill_done.html surveybox/web/templates/personal.html msgid "Your changes have been saved." msgstr "Ihre Änderungen wurden gespeichert." @@ -4160,7 +4217,7 @@ msgstr "Die Mail wurde zum Versand eingetragen." msgid "The email could not be sent to this person." msgstr "Die Mail konnte an diese Person nicht gesendet werden." -#: surveybox/web/templates/followup_recipients.html +#: surveybox/web/templates/followup_recipients.html surveybox/web/templates/form_invitations.html msgid "Taken part" msgstr "Teilgenommen" @@ -4282,6 +4339,10 @@ msgstr "Live-Vorschau" msgid "Team" msgstr "Team" +#: surveybox/web/templates/form_designer.html surveybox/web/templates/form_invitations.html +msgid "Invitations" +msgstr "Einladungen" + #: surveybox/web/templates/form_designer.html surveybox/web/templates/form_history.html #: surveybox/web/templates/form_history_compare.html msgid "History" @@ -4683,6 +4744,155 @@ msgstr "" msgid "Restore selected" msgstr "Ausgewähltes wiederherstellen" +#: surveybox/web/templates/form_invitations.html surveybox/web/templates/question_edit.html +msgid "Dates" +msgstr "Termine" + +#: surveybox/web/templates/form_invitations.html +msgid "as soon as the form is open" +msgstr "sobald das Formular offen ist" + +#: surveybox/web/templates/form_invitations.html +msgid "Access list" +msgstr "Zugriffsliste" + +#: surveybox/web/templates/form_invitations.html +msgid "People and groups of the access list are invited by email." +msgstr "Personen und Gruppen der Zugriffsliste werden per E-Mail eingeladen." + +#: surveybox/web/templates/form_invitations.html +msgid "People and groups of the access list are only reminded, not invited." +msgstr "Personen und Gruppen der Zugriffsliste werden nur erinnert, nicht eingeladen." + +#: surveybox/web/templates/form_invitations.html +msgid "Change dates" +msgstr "Termine ändern" + +#: surveybox/web/templates/form_invitations.html +msgid "Invitations go out once the form is published and open." +msgstr "Einladungen gehen hinaus, sobald das Formular veröffentlicht und offen ist." + +#: surveybox/web/templates/form_invitations.html surveybox/web/templates/form_settings.html +msgid "Invite by email address" +msgstr "Per E-Mail-Adresse einladen" + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d guest invited." +msgid_plural "%(num)d guests invited." +msgstr[0] "%(num)d Gast eingeladen." +msgstr[1] "%(num)d Gäste eingeladen." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d person with an account invited." +msgid_plural "%(num)d people with an account invited." +msgstr[0] "%(num)d Person mit Konto eingeladen." +msgstr[1] "%(num)d Personen mit Konto eingeladen." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d address was already invited." +msgid_plural "%(num)d addresses were already invited." +msgstr[0] "%(num)d Adresse war schon eingeladen." +msgstr[1] "%(num)d Adressen waren schon eingeladen." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "Not invited, account deactivated: %(list)s" +msgstr "Nicht eingeladen, Konto deaktiviert: %(list)s" + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "Not valid, left in the field below: %(list)s" +msgstr "Ungültig, im Feld unten stehen geblieben: %(list)s" + +#: surveybox/web/templates/form_invitations.html +msgid "Email addresses" +msgstr "E-Mail-Adressen" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"Separated by commas, semicolons or line breaks; copied lists like “Erika Mustermann " +"” work too. Addresses of existing accounts are added to the access list and " +"invited with the normal link (with sign-in). All others are invited as guests: each gets a " +"personal invitation link that opens the form without an account and leads back to their own " +"answer later." +msgstr "" +"Getrennt durch Kommas, Semikolons oder Zeilenumbrüche; kopierte Listen wie „Erika Mustermann " +"“ gehen auch. Adressen vorhandener Konten kommen in die Zugriffsliste und " +"werden mit dem normalen Link eingeladen (mit Anmeldung). Alle anderen werden als Gäste " +"eingeladen: Jede Adresse bekommt einen persönlichen Einladungslink, der das Formular ohne Konto " +"öffnet und später zur eigenen Antwort führt." + +#: surveybox/web/templates/form_invitations.html +msgid "Invite" +msgstr "Einladen" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"This form is anonymous: who has taken part is not shown here. Reminders still go only to people " +"who have not taken part." +msgstr "" +"Dieses Formular ist anonym: Wer teilgenommen hat, wird hier nicht gezeigt. Erinnerungen gehen " +"trotzdem nur an Personen ohne Teilnahme." + +#: surveybox/web/templates/form_invitations.html +msgid "Guests" +msgstr "Gäste" + +#: surveybox/web/templates/form_invitations.html +msgid "Invited" +msgstr "Eingeladen" + +#: surveybox/web/templates/form_invitations.html +msgid "Reminded" +msgstr "Erinnert" + +#: surveybox/web/templates/form_invitations.html +msgid "no more emails" +msgstr "keine Mails mehr" + +#: surveybox/web/templates/form_invitations.html +msgid "planned" +msgstr "geplant" + +#: surveybox/web/templates/form_invitations.html +msgid "yes" +msgstr "ja" + +#: surveybox/web/templates/form_invitations.html +msgid "not yet" +msgstr "noch nicht" + +#: surveybox/web/templates/form_invitations.html +msgid "Withdraw" +msgstr "Zurückziehen" + +#: surveybox/web/templates/form_invitations.html +msgid "Withdrawing an invitation makes its link invalid; an answer already given stays." +msgstr "Eine zurückgezogene Einladung macht ihren Link ungültig; eine schon gegebene Antwort bleibt." + +#: surveybox/web/templates/form_invitations.html +msgid "No guests invited yet." +msgstr "Noch keine Gäste eingeladen." + +#: surveybox/web/templates/form_invitations.html +msgid "People with an account" +msgstr "Personen mit Konto" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"Accounts appear here once they are invited: added above, or from the access list when invitations" +" go out." +msgstr "" +"Konten erscheinen hier, sobald sie eingeladen sind: oben hinzugefügt oder aus der Zugriffsliste, " +"wenn die Einladungen hinausgehen." + +#: surveybox/web/templates/form_invitations.html +msgid "Edit access list" +msgstr "Zugriffsliste bearbeiten" + #: surveybox/web/templates/form_preview.html msgid "Phone" msgstr "Handy" @@ -4952,8 +5162,45 @@ msgid "Only needed for “link and password”." msgstr "Nur nötig für „Link und Passwort“." #: surveybox/web/templates/form_settings.html -msgid "For “selected users and groups” you choose them on the next page." -msgstr "Bei „ausgewählte Benutzer und Gruppen“ wählen Sie diese auf der nächsten Seite." +msgid "" +"For “only invited people” you choose users and groups on the next page; guests are invited by " +"email under “Invitations”. Personal invitation links open the form with every kind of access." +msgstr "" +"Für „Nur Eingeladene“ wählen Sie Benutzer und Gruppen auf der nächsten Seite; Gäste laden Sie " +"unter „Einladungen“ per E-Mail ein. Persönliche Einladungslinks öffnen das Formular bei jeder " +"Zugriffsart." + +#: surveybox/web/templates/form_settings.html +msgid "Invitations and reminders" +msgstr "Einladungen und Erinnerungen" + +#: surveybox/web/templates/form_settings.html +msgid "Guests and accounts you add under “Invitations” are always invited by email." +msgstr "Gäste und Konten, die Sie unter „Einladungen“ hinzufügen, werden immer per E-Mail eingeladen." + +#: surveybox/web/templates/form_settings.html +msgid "Send invitations (empty: as soon as the form is open)" +msgstr "Einladungen versenden (leer: sobald das Formular offen ist)" + +#: surveybox/web/templates/form_settings.html +msgid "First reminder (empty: none)" +msgstr "Erste Erinnerung (leer: keine)" + +#: surveybox/web/templates/form_settings.html +msgid "Last reminder (empty: none)" +msgstr "Letzte Erinnerung (leer: keine)" + +#: surveybox/web/templates/form_settings.html +msgid "" +"The dates lie between the start and the end of participation, if those are set; reminders come " +"after the invitation. Reminded are invited people who have not taken part yet and were invited " +"before the reminder. People with an account can switch these emails off in their account, guests " +"with a link in every email." +msgstr "" +"Die Termine liegen zwischen Beginn und Ende der Teilnahme, sofern diese gesetzt sind; " +"Erinnerungen kommen nach der Einladung. Erinnert werden Eingeladene, die noch nicht teilgenommen " +"haben und vor der Erinnerung eingeladen wurden. Personen mit Konto können diese Mails in ihrem " +"Konto abschalten, Gäste über einen Link in jeder Mail." #: surveybox/web/templates/form_settings.html msgid "Participation" @@ -4973,14 +5220,6 @@ msgstr "" "Für angemeldete Teilnehmende und für Gäste mit ihrem persönlichen Link; nicht bei anonymen " "Formularen." -#: surveybox/web/templates/form_settings.html -msgid "" -"Only for access “Selected users and groups” and with an end date. Each person gets the reminder " -"once, by email; they can switch reminders off in their account." -msgstr "" -"Nur bei Zugriff „Ausgewählte Benutzer und Gruppen“ und mit Enddatum. Jede Person erhält die " -"Erinnerung einmal per E-Mail; abschalten kann sie das in ihrem Konto." - #: surveybox/web/templates/form_settings.html msgid "Never" msgstr "Nie" @@ -5469,6 +5708,46 @@ msgstr "verbunden und aktuell" msgid "not reachable or not up to date" msgstr "nicht erreichbar oder nicht aktuell" +#: surveybox/web/templates/invitation.html +msgid "This invitation link is not valid (any more). Please ask the person who invited you." +msgstr "" +"Dieser Einladungslink ist (nicht mehr) gültig. Bitte wenden Sie sich an die Person, die Sie " +"eingeladen hat." + +#: surveybox/web/templates/invitation.html +#, python-format +msgid "" +"Your invitation to “%(title)s” and your address in it have been deleted. You will not receive any" +" further emails about it." +msgstr "" +"Ihre Einladung zu „%(title)s“ und Ihre Adresse darin wurden gelöscht. Sie bekommen dazu keine " +"Mails mehr." + +#: surveybox/web/templates/invitation.html +#, python-format +msgid "Invitation to “%(title)s”" +msgstr "Einladung zu „%(title)s“" + +#: surveybox/web/templates/invitation.html +msgid "You will not receive any further emails about this invitation. Your invitation link still works." +msgstr "Sie bekommen zu dieser Einladung keine Mails mehr. Ihr Einladungslink funktioniert weiterhin." + +#: surveybox/web/templates/invitation.html +msgid "No further emails about this invitation" +msgstr "Keine Mails mehr zu dieser Einladung" + +#: surveybox/web/templates/invitation.html +msgid "" +"You can also delete the invitation with your address. The organisers then no longer see it, and " +"the invitation link stops working; an answer you already gave stays." +msgstr "" +"Sie können die Einladung auch samt Ihrer Adresse löschen. Die Organisatoren sehen sie dann nicht " +"mehr, und der Einladungslink funktioniert nicht mehr; eine schon gegebene Antwort bleibt." + +#: surveybox/web/templates/invitation.html +msgid "Delete invitation and address" +msgstr "Einladung und Adresse löschen" + #: surveybox/web/templates/login.html surveybox/web/templates/login_mfa.html msgid "or" msgstr "oder" @@ -5816,10 +6095,6 @@ msgstr "Optionen sind" msgid "Texts" msgstr "Texte" -#: surveybox/web/templates/question_edit.html -msgid "Dates" -msgstr "Termine" - #: surveybox/web/templates/question_edit.html msgid "Answers per option" msgstr "Antworten je Option" @@ -6537,6 +6812,41 @@ msgstr "" msgid "Without confirmation you get no further emails, and your address is deleted after 7 days." msgstr "Ohne Bestätigung erhalten Sie keine weiteren E-Mails, und Ihre Adresse wird nach 7 Tagen gelöscht." +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "Invitation: %(title)s" +msgstr "Einladung: %(title)s" + +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "You are invited to take part in “%(title)s”." +msgstr "Sie sind eingeladen, an „%(title)s“ teilzunehmen." + +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "The form is open until %(date)s." +msgstr "Das Formular ist bis %(date)s offen." + +#: surveybox/web/templates/mail/invitation.txt +msgid "Your personal link (no account needed):" +msgstr "Ihr persönlicher Link (kein Konto nötig):" + +#: surveybox/web/templates/mail/invitation.txt +msgid "" +"The link is meant for you only: with it you can also view and, if the form allows it, change your" +" answer later." +msgstr "" +"Der Link ist nur für Sie bestimmt: Mit ihm können Sie Ihre Antwort später auch ansehen und, wenn " +"das Formular es erlaubt, ändern." + +#: surveybox/web/templates/mail/invitation.txt surveybox/web/templates/mail/reminder.txt +msgid "If you do not want any further emails about this invitation:" +msgstr "Wenn Sie keine weiteren Mails zu dieser Einladung möchten:" + +#: surveybox/web/templates/mail/invitation.txt +msgid "Please sign in to take part:" +msgstr "Bitte melden Sie sich zur Teilnahme an:" + #: surveybox/web/templates/mail/invite.txt #, python-format msgid "Your access to %(app)s" @@ -6645,6 +6955,11 @@ msgstr "" "Sie sind zu „%(title)s“ eingeladen und haben noch nicht teilgenommen. Das Formular ist bis " "%(date)s geöffnet." +#: surveybox/web/templates/mail/reminder.txt +#, python-format +msgid "You have been invited to “%(title)s” and have not taken part yet." +msgstr "Sie wurden zu „%(title)s“ eingeladen und haben noch nicht teilgenommen." + #: surveybox/web/templates/mail/retention_notice.txt #, python-format msgid "Retention period ends soon: %(title)s" diff --git a/surveybox/locale/en/LC_MESSAGES/messages.po b/surveybox/locale/en/LC_MESSAGES/messages.po index 98efa57..b52d2ef 100644 --- a/surveybox/locale/en/LC_MESSAGES/messages.po +++ b/surveybox/locale/en/LC_MESSAGES/messages.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Surveybox VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-11-26 09:14+0100\n" +"POT-Creation-Date: 2026-11-26 09:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -178,9 +178,9 @@ msgstr "Last name" #: surveybox/forms/export.py surveybox/forms/types.py surveybox/web/templates/_fill_fields.html #: surveybox/web/templates/account.html surveybox/web/templates/admin_group_edit.html #: surveybox/web/templates/admin_user_new.html surveybox/web/templates/admin_users.html -#: surveybox/web/templates/forgot.html surveybox/web/templates/guest_links.html -#: surveybox/web/templates/login.html surveybox/web/templates/question_edit.html -#: surveybox/web/templates/register.html +#: surveybox/web/templates/forgot.html surveybox/web/templates/form_invitations.html +#: surveybox/web/templates/guest_links.html surveybox/web/templates/login.html +#: surveybox/web/templates/question_edit.html surveybox/web/templates/register.html msgid "Email address" msgstr "Email address" @@ -262,7 +262,7 @@ msgstr "all" msgid "Answer filter" msgstr "Answer filter" -#: surveybox/forms/export.py +#: surveybox/forms/export.py surveybox/web/templates/form_invitations.html msgid "none" msgstr "none" @@ -297,7 +297,8 @@ msgstr "Single choice (same options)" #: surveybox/forms/pdf_export.py surveybox/web/templates/account.html #: surveybox/web/templates/admin_group_edit.html surveybox/web/templates/admin_groups.html #: surveybox/web/templates/admin_user_edit.html surveybox/web/templates/admin_user_new.html -#: surveybox/web/templates/admin_users.html surveybox/web/templates/register.html +#: surveybox/web/templates/admin_users.html surveybox/web/templates/form_invitations.html +#: surveybox/web/templates/register.html msgid "Name" msgstr "Name" @@ -589,9 +590,13 @@ msgstr "Date confirmed in a poll" msgid "Chosen entry or date removed" msgstr "Chosen entry or date removed" +#: surveybox/mail/custom.py surveybox/mail/notify.py +msgid "Invitation to a form" +msgstr "Invitation to a form" + #: surveybox/mail/custom.py -msgid "Reminder before the end date" -msgstr "Reminder before the end date" +msgid "Reminder to invited people" +msgstr "Reminder to invited people" #: surveybox/mail/custom.py surveybox/web/routes/admin_mail.py msgid "Comment published" @@ -661,6 +666,10 @@ msgstr "sign-in page" msgid "settings of the form" msgstr "settings of the form" +#: surveybox/mail/custom.py +msgid "link to stop emails about an invitation (guests only)" +msgstr "link to stop emails about an invitation (guests only)" + #: surveybox/mail/custom.py msgid "greeting, e.g. “Hello Erika,”" msgstr "greeting, e.g. “Hello Erika,”" @@ -698,12 +707,12 @@ msgstr "The text must contain {details} or these placeholders: %(names)s" #: surveybox/mail/custom.py surveybox/web/templates/mail/changed.txt #: surveybox/web/templates/mail/comment_new.txt surveybox/web/templates/mail/comment_published.txt #: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/mail/deadline.txt -#: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/invite.txt -#: surveybox/web/templates/mail/participation.txt surveybox/web/templates/mail/password_reset.txt -#: surveybox/web/templates/mail/promoted.txt surveybox/web/templates/mail/register.txt -#: surveybox/web/templates/mail/register_exists.txt surveybox/web/templates/mail/reminder.txt -#: surveybox/web/templates/mail/retention_notice.txt surveybox/web/templates/mail/slot_full.txt -#: surveybox/web/templates/mail/test.txt +#: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/invitation.txt +#: surveybox/web/templates/mail/invite.txt surveybox/web/templates/mail/participation.txt +#: surveybox/web/templates/mail/password_reset.txt surveybox/web/templates/mail/promoted.txt +#: surveybox/web/templates/mail/register.txt surveybox/web/templates/mail/register_exists.txt +#: surveybox/web/templates/mail/reminder.txt surveybox/web/templates/mail/retention_notice.txt +#: surveybox/web/templates/mail/slot_full.txt surveybox/web/templates/mail/test.txt #, python-format msgid "Hello %(name)s," msgstr "Hello %(name)s," @@ -713,12 +722,12 @@ msgstr "Hello %(name)s," #: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/mail/deadline.txt #: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/guest_erase.txt #: surveybox/web/templates/mail/guest_export.txt surveybox/web/templates/mail/guest_links.txt -#: surveybox/web/templates/mail/guest_receipt.txt surveybox/web/templates/mail/invite.txt -#: surveybox/web/templates/mail/participation.txt surveybox/web/templates/mail/password_reset.txt -#: surveybox/web/templates/mail/promoted.txt surveybox/web/templates/mail/register.txt -#: surveybox/web/templates/mail/register_exists.txt surveybox/web/templates/mail/reminder.txt -#: surveybox/web/templates/mail/retention_notice.txt surveybox/web/templates/mail/slot_full.txt -#: surveybox/web/templates/mail/test.txt +#: surveybox/web/templates/mail/guest_receipt.txt surveybox/web/templates/mail/invitation.txt +#: surveybox/web/templates/mail/invite.txt surveybox/web/templates/mail/participation.txt +#: surveybox/web/templates/mail/password_reset.txt surveybox/web/templates/mail/promoted.txt +#: surveybox/web/templates/mail/register.txt surveybox/web/templates/mail/register_exists.txt +#: surveybox/web/templates/mail/reminder.txt surveybox/web/templates/mail/retention_notice.txt +#: surveybox/web/templates/mail/slot_full.txt surveybox/web/templates/mail/test.txt msgid "Hello," msgstr "Hello," @@ -747,8 +756,8 @@ msgid "An entry or date I chose has been removed from a form" msgstr "An entry or date I chose has been removed from a form" #: surveybox/mail/notify.py -msgid "Reminder before the end date of a form I was invited to" -msgstr "Reminder before the end date of a form I was invited to" +msgid "Reminder about a form I was invited to" +msgstr "Reminder about a form I was invited to" #: surveybox/mail/notify.py msgid "New comments on forms I manage" @@ -1138,6 +1147,14 @@ msgstr "Form history settings changed" msgid "Lock of an account lifted" msgstr "Lock of an account lifted" +#: surveybox/web/routes/admin.py +msgid "People invited to a form by email" +msgstr "People invited to a form by email" + +#: surveybox/web/routes/admin.py +msgid "Invitation withdrawn" +msgstr "Invitation withdrawn" + #: surveybox/web/routes/admin.py msgid "Account deleted" msgstr "Account deleted" @@ -1218,7 +1235,7 @@ msgstr "Please save the relay settings first." msgid "Test message" msgstr "Test message" -#: surveybox/web/routes/admin_mail.py +#: surveybox/web/routes/admin_mail.py surveybox/web/templates/invitation.html msgid "Invitation" msgstr "Invitation" @@ -1573,9 +1590,21 @@ msgstr "Show who has signed up" msgid "Places per person across all participation fields (empty: no limit)" msgstr "Places per person across all participation fields (empty: no limit)" +#: surveybox/web/routes/form_history.py +msgid "Send invitations" +msgstr "Send invitations" + +#: surveybox/web/routes/form_history.py surveybox/web/templates/form_invitations.html +msgid "First reminder" +msgstr "First reminder" + +#: surveybox/web/routes/form_history.py surveybox/web/templates/form_invitations.html +msgid "Last reminder" +msgstr "Last reminder" + #: surveybox/web/routes/form_history.py surveybox/web/templates/form_settings.html -msgid "Remind invited people who have not taken part yet … days before the end (empty: no reminder)" -msgstr "Remind invited people who have not taken part yet … days before the end (empty: no reminder)" +msgid "Invite the people and groups of the access list by email" +msgstr "Invite the people and groups of the access list by email" #: surveybox/web/routes/form_history.py surveybox/web/templates/form_settings.html msgid "Confirmed dates as calendar" @@ -1618,6 +1647,18 @@ msgstr "This form can no longer be restored." msgid "Restored from the form history (state of %(date)s)." msgstr "Restored from the form history (state of %(date)s)." +#: surveybox/web/routes/form_invitations.py +msgid "Please paste at least one email address." +msgstr "Please paste at least one email address." + +#: surveybox/web/routes/form_invitations.py +msgid "At most 500 addresses at once." +msgstr "At most 500 addresses at once." + +#: surveybox/web/routes/form_invitations.py +msgid "A form can have at most 5000 invitations." +msgstr "A form can have at most 5000 invitations." + #: surveybox/web/routes/form_results.py msgid "Please describe why you change this answer." msgstr "Please describe why you change this answer." @@ -1764,8 +1805,20 @@ msgid "Please enter a valid reply-to address (without a name)." msgstr "Please enter a valid reply-to address (without a name)." #: surveybox/web/routes/forms.py -msgid "The reminder must be between 1 and 30 days before the end." -msgstr "The reminder must be between 1 and 30 days before the end." +msgid "Invitations and reminders cannot be before the start of participation." +msgstr "Invitations and reminders cannot be before the start of participation." + +#: surveybox/web/routes/forms.py +msgid "Invitations and reminders must be before the end of participation." +msgstr "Invitations and reminders must be before the end of participation." + +#: surveybox/web/routes/forms.py +msgid "The last reminder must come after the first reminder." +msgstr "The last reminder must come after the first reminder." + +#: surveybox/web/routes/forms.py +msgid "Reminders must come after the invitations." +msgstr "Reminders must come after the invitations." #: surveybox/web/routes/forms.py msgid "“All signed-in users” is reserved for instance-wide roles. Choose groups or a link." @@ -1792,8 +1845,8 @@ msgid "All signed-in users" msgstr "All signed-in users" #: surveybox/web/routes/forms.py -msgid "Selected users and groups" -msgstr "Selected users and groups" +msgid "Only invited people: selected users and groups, guests invited by email" +msgstr "Only invited people: selected users and groups, guests invited by email" #: surveybox/web/routes/forms.py msgid "Anyone with the link, also without an account" @@ -3841,6 +3894,10 @@ msgstr "This form is closed. Answers can no longer be submitted." msgid "You have already filled in this form." msgstr "You have already filled in this form." +#: surveybox/web/templates/fill_done.html +msgid "Open the link from your invitation again to view your answer." +msgstr "Open the link from your invitation again to view your answer." + #: surveybox/web/templates/fill_done.html surveybox/web/templates/personal.html msgid "Your changes have been saved." msgstr "Your changes have been saved." @@ -4126,7 +4183,7 @@ msgstr "The email has been queued for sending." msgid "The email could not be sent to this person." msgstr "The email could not be sent to this person." -#: surveybox/web/templates/followup_recipients.html +#: surveybox/web/templates/followup_recipients.html surveybox/web/templates/form_invitations.html msgid "Taken part" msgstr "Taken part" @@ -4246,6 +4303,10 @@ msgstr "Live preview" msgid "Team" msgstr "Team" +#: surveybox/web/templates/form_designer.html surveybox/web/templates/form_invitations.html +msgid "Invitations" +msgstr "Invitations" + #: surveybox/web/templates/form_designer.html surveybox/web/templates/form_history.html #: surveybox/web/templates/form_history_compare.html msgid "History" @@ -4644,6 +4705,155 @@ msgstr "" msgid "Restore selected" msgstr "Restore selected" +#: surveybox/web/templates/form_invitations.html surveybox/web/templates/question_edit.html +msgid "Dates" +msgstr "Dates" + +#: surveybox/web/templates/form_invitations.html +msgid "as soon as the form is open" +msgstr "as soon as the form is open" + +#: surveybox/web/templates/form_invitations.html +msgid "Access list" +msgstr "Access list" + +#: surveybox/web/templates/form_invitations.html +msgid "People and groups of the access list are invited by email." +msgstr "People and groups of the access list are invited by email." + +#: surveybox/web/templates/form_invitations.html +msgid "People and groups of the access list are only reminded, not invited." +msgstr "People and groups of the access list are only reminded, not invited." + +#: surveybox/web/templates/form_invitations.html +msgid "Change dates" +msgstr "Change dates" + +#: surveybox/web/templates/form_invitations.html +msgid "Invitations go out once the form is published and open." +msgstr "Invitations go out once the form is published and open." + +#: surveybox/web/templates/form_invitations.html surveybox/web/templates/form_settings.html +msgid "Invite by email address" +msgstr "Invite by email address" + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d guest invited." +msgid_plural "%(num)d guests invited." +msgstr[0] "%(num)d guest invited." +msgstr[1] "%(num)d guests invited." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d person with an account invited." +msgid_plural "%(num)d people with an account invited." +msgstr[0] "%(num)d person with an account invited." +msgstr[1] "%(num)d people with an account invited." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d address was already invited." +msgid_plural "%(num)d addresses were already invited." +msgstr[0] "%(num)d address was already invited." +msgstr[1] "%(num)d addresses were already invited." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "Not invited, account deactivated: %(list)s" +msgstr "Not invited, account deactivated: %(list)s" + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "Not valid, left in the field below: %(list)s" +msgstr "Not valid, left in the field below: %(list)s" + +#: surveybox/web/templates/form_invitations.html +msgid "Email addresses" +msgstr "Email addresses" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"Separated by commas, semicolons or line breaks; copied lists like “Erika Mustermann " +"” work too. Addresses of existing accounts are added to the access list and " +"invited with the normal link (with sign-in). All others are invited as guests: each gets a " +"personal invitation link that opens the form without an account and leads back to their own " +"answer later." +msgstr "" +"Separated by commas, semicolons or line breaks; copied lists like “Erika Mustermann " +"” work too. Addresses of existing accounts are added to the access list and " +"invited with the normal link (with sign-in). All others are invited as guests: each gets a " +"personal invitation link that opens the form without an account and leads back to their own " +"answer later." + +#: surveybox/web/templates/form_invitations.html +msgid "Invite" +msgstr "Invite" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"This form is anonymous: who has taken part is not shown here. Reminders still go only to people " +"who have not taken part." +msgstr "" +"This form is anonymous: who has taken part is not shown here. Reminders still go only to people " +"who have not taken part." + +#: surveybox/web/templates/form_invitations.html +msgid "Guests" +msgstr "Guests" + +#: surveybox/web/templates/form_invitations.html +msgid "Invited" +msgstr "Invited" + +#: surveybox/web/templates/form_invitations.html +msgid "Reminded" +msgstr "Reminded" + +#: surveybox/web/templates/form_invitations.html +msgid "no more emails" +msgstr "no more emails" + +#: surveybox/web/templates/form_invitations.html +msgid "planned" +msgstr "planned" + +#: surveybox/web/templates/form_invitations.html +msgid "yes" +msgstr "yes" + +#: surveybox/web/templates/form_invitations.html +msgid "not yet" +msgstr "not yet" + +#: surveybox/web/templates/form_invitations.html +msgid "Withdraw" +msgstr "Withdraw" + +#: surveybox/web/templates/form_invitations.html +msgid "Withdrawing an invitation makes its link invalid; an answer already given stays." +msgstr "Withdrawing an invitation makes its link invalid; an answer already given stays." + +#: surveybox/web/templates/form_invitations.html +msgid "No guests invited yet." +msgstr "No guests invited yet." + +#: surveybox/web/templates/form_invitations.html +msgid "People with an account" +msgstr "People with an account" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"Accounts appear here once they are invited: added above, or from the access list when invitations" +" go out." +msgstr "" +"Accounts appear here once they are invited: added above, or from the access list when invitations" +" go out." + +#: surveybox/web/templates/form_invitations.html +msgid "Edit access list" +msgstr "Edit access list" + #: surveybox/web/templates/form_preview.html msgid "Phone" msgstr "Phone" @@ -4910,8 +5120,44 @@ msgid "Only needed for “link and password”." msgstr "Only needed for “link and password”." #: surveybox/web/templates/form_settings.html -msgid "For “selected users and groups” you choose them on the next page." -msgstr "For “selected users and groups” you choose them on the next page." +msgid "" +"For “only invited people” you choose users and groups on the next page; guests are invited by " +"email under “Invitations”. Personal invitation links open the form with every kind of access." +msgstr "" +"For “only invited people” you choose users and groups on the next page; guests are invited by " +"email under “Invitations”. Personal invitation links open the form with every kind of access." + +#: surveybox/web/templates/form_settings.html +msgid "Invitations and reminders" +msgstr "Invitations and reminders" + +#: surveybox/web/templates/form_settings.html +msgid "Guests and accounts you add under “Invitations” are always invited by email." +msgstr "Guests and accounts you add under “Invitations” are always invited by email." + +#: surveybox/web/templates/form_settings.html +msgid "Send invitations (empty: as soon as the form is open)" +msgstr "Send invitations (empty: as soon as the form is open)" + +#: surveybox/web/templates/form_settings.html +msgid "First reminder (empty: none)" +msgstr "First reminder (empty: none)" + +#: surveybox/web/templates/form_settings.html +msgid "Last reminder (empty: none)" +msgstr "Last reminder (empty: none)" + +#: surveybox/web/templates/form_settings.html +msgid "" +"The dates lie between the start and the end of participation, if those are set; reminders come " +"after the invitation. Reminded are invited people who have not taken part yet and were invited " +"before the reminder. People with an account can switch these emails off in their account, guests " +"with a link in every email." +msgstr "" +"The dates lie between the start and the end of participation, if those are set; reminders come " +"after the invitation. Reminded are invited people who have not taken part yet and were invited " +"before the reminder. People with an account can switch these emails off in their account, guests " +"with a link in every email." #: surveybox/web/templates/form_settings.html msgid "Participation" @@ -4929,14 +5175,6 @@ msgstr "Yes, until the form closes" msgid "For signed-in participants and for guests with their personal link; not for anonymous forms." msgstr "For signed-in participants and for guests with their personal link; not for anonymous forms." -#: surveybox/web/templates/form_settings.html -msgid "" -"Only for access “Selected users and groups” and with an end date. Each person gets the reminder " -"once, by email; they can switch reminders off in their account." -msgstr "" -"Only for access “Selected users and groups” and with an end date. Each person gets the reminder " -"once, by email; they can switch reminders off in their account." - #: surveybox/web/templates/form_settings.html msgid "Never" msgstr "Never" @@ -5413,6 +5651,44 @@ msgstr "connected and up to date" msgid "not reachable or not up to date" msgstr "not reachable or not up to date" +#: surveybox/web/templates/invitation.html +msgid "This invitation link is not valid (any more). Please ask the person who invited you." +msgstr "This invitation link is not valid (any more). Please ask the person who invited you." + +#: surveybox/web/templates/invitation.html +#, python-format +msgid "" +"Your invitation to “%(title)s” and your address in it have been deleted. You will not receive any" +" further emails about it." +msgstr "" +"Your invitation to “%(title)s” and your address in it have been deleted. You will not receive any" +" further emails about it." + +#: surveybox/web/templates/invitation.html +#, python-format +msgid "Invitation to “%(title)s”" +msgstr "Invitation to “%(title)s”" + +#: surveybox/web/templates/invitation.html +msgid "You will not receive any further emails about this invitation. Your invitation link still works." +msgstr "You will not receive any further emails about this invitation. Your invitation link still works." + +#: surveybox/web/templates/invitation.html +msgid "No further emails about this invitation" +msgstr "No further emails about this invitation" + +#: surveybox/web/templates/invitation.html +msgid "" +"You can also delete the invitation with your address. The organisers then no longer see it, and " +"the invitation link stops working; an answer you already gave stays." +msgstr "" +"You can also delete the invitation with your address. The organisers then no longer see it, and " +"the invitation link stops working; an answer you already gave stays." + +#: surveybox/web/templates/invitation.html +msgid "Delete invitation and address" +msgstr "Delete invitation and address" + #: surveybox/web/templates/login.html surveybox/web/templates/login_mfa.html msgid "or" msgstr "or" @@ -5751,10 +6027,6 @@ msgstr "Options are" msgid "Texts" msgstr "Texts" -#: surveybox/web/templates/question_edit.html -msgid "Dates" -msgstr "Dates" - #: surveybox/web/templates/question_edit.html msgid "Answers per option" msgstr "Answers per option" @@ -6462,6 +6734,41 @@ msgstr "" msgid "Without confirmation you get no further emails, and your address is deleted after 7 days." msgstr "Without confirmation you get no further emails, and your address is deleted after 7 days." +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "Invitation: %(title)s" +msgstr "Invitation: %(title)s" + +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "You are invited to take part in “%(title)s”." +msgstr "You are invited to take part in “%(title)s”." + +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "The form is open until %(date)s." +msgstr "The form is open until %(date)s." + +#: surveybox/web/templates/mail/invitation.txt +msgid "Your personal link (no account needed):" +msgstr "Your personal link (no account needed):" + +#: surveybox/web/templates/mail/invitation.txt +msgid "" +"The link is meant for you only: with it you can also view and, if the form allows it, change your" +" answer later." +msgstr "" +"The link is meant for you only: with it you can also view and, if the form allows it, change your" +" answer later." + +#: surveybox/web/templates/mail/invitation.txt surveybox/web/templates/mail/reminder.txt +msgid "If you do not want any further emails about this invitation:" +msgstr "If you do not want any further emails about this invitation:" + +#: surveybox/web/templates/mail/invitation.txt +msgid "Please sign in to take part:" +msgstr "Please sign in to take part:" + #: surveybox/web/templates/mail/invite.txt #, python-format msgid "Your access to %(app)s" @@ -6562,6 +6869,11 @@ msgstr "Reminder: %(title)s" msgid "You have been invited to “%(title)s” and have not taken part yet. The form is open until %(date)s." msgstr "You have been invited to “%(title)s” and have not taken part yet. The form is open until %(date)s." +#: surveybox/web/templates/mail/reminder.txt +#, python-format +msgid "You have been invited to “%(title)s” and have not taken part yet." +msgstr "You have been invited to “%(title)s” and have not taken part yet." + #: surveybox/web/templates/mail/retention_notice.txt #, python-format msgid "Retention period ends soon: %(title)s" diff --git a/surveybox/locale/fr/LC_MESSAGES/messages.po b/surveybox/locale/fr/LC_MESSAGES/messages.po index 6589c0f..3ec2a55 100644 --- a/surveybox/locale/fr/LC_MESSAGES/messages.po +++ b/surveybox/locale/fr/LC_MESSAGES/messages.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Surveybox VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-11-26 09:14+0100\n" +"POT-Creation-Date: 2026-11-26 09:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: fr\n" @@ -178,9 +178,9 @@ msgstr "Nom" #: surveybox/forms/export.py surveybox/forms/types.py surveybox/web/templates/_fill_fields.html #: surveybox/web/templates/account.html surveybox/web/templates/admin_group_edit.html #: surveybox/web/templates/admin_user_new.html surveybox/web/templates/admin_users.html -#: surveybox/web/templates/forgot.html surveybox/web/templates/guest_links.html -#: surveybox/web/templates/login.html surveybox/web/templates/question_edit.html -#: surveybox/web/templates/register.html +#: surveybox/web/templates/forgot.html surveybox/web/templates/form_invitations.html +#: surveybox/web/templates/guest_links.html surveybox/web/templates/login.html +#: surveybox/web/templates/question_edit.html surveybox/web/templates/register.html msgid "Email address" msgstr "Adresse e-mail" @@ -262,7 +262,7 @@ msgstr "tous" msgid "Answer filter" msgstr "Filtre de réponse" -#: surveybox/forms/export.py +#: surveybox/forms/export.py surveybox/web/templates/form_invitations.html msgid "none" msgstr "aucun" @@ -297,7 +297,8 @@ msgstr "Choix unique (mêmes options)" #: surveybox/forms/pdf_export.py surveybox/web/templates/account.html #: surveybox/web/templates/admin_group_edit.html surveybox/web/templates/admin_groups.html #: surveybox/web/templates/admin_user_edit.html surveybox/web/templates/admin_user_new.html -#: surveybox/web/templates/admin_users.html surveybox/web/templates/register.html +#: surveybox/web/templates/admin_users.html surveybox/web/templates/form_invitations.html +#: surveybox/web/templates/register.html msgid "Name" msgstr "Nom" @@ -589,9 +590,13 @@ msgstr "Date confirmée dans un sondage" msgid "Chosen entry or date removed" msgstr "Entrée ou date choisie supprimée" +#: surveybox/mail/custom.py surveybox/mail/notify.py +msgid "Invitation to a form" +msgstr "Invitation à un formulaire" + #: surveybox/mail/custom.py -msgid "Reminder before the end date" -msgstr "Rappel avant la date de fin" +msgid "Reminder to invited people" +msgstr "Rappel aux personnes invitées" #: surveybox/mail/custom.py surveybox/web/routes/admin_mail.py msgid "Comment published" @@ -661,6 +666,10 @@ msgstr "page de connexion" msgid "settings of the form" msgstr "réglages du formulaire" +#: surveybox/mail/custom.py +msgid "link to stop emails about an invitation (guests only)" +msgstr "lien pour ne plus recevoir d’e-mails sur une invitation (invités uniquement)" + #: surveybox/mail/custom.py msgid "greeting, e.g. “Hello Erika,”" msgstr "formule d’appel, par ex. « Bonjour Erika, »" @@ -698,12 +707,12 @@ msgstr "Le texte doit contenir {details} ou ces espaces réservés : %(names)s" #: surveybox/mail/custom.py surveybox/web/templates/mail/changed.txt #: surveybox/web/templates/mail/comment_new.txt surveybox/web/templates/mail/comment_published.txt #: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/mail/deadline.txt -#: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/invite.txt -#: surveybox/web/templates/mail/participation.txt surveybox/web/templates/mail/password_reset.txt -#: surveybox/web/templates/mail/promoted.txt surveybox/web/templates/mail/register.txt -#: surveybox/web/templates/mail/register_exists.txt surveybox/web/templates/mail/reminder.txt -#: surveybox/web/templates/mail/retention_notice.txt surveybox/web/templates/mail/slot_full.txt -#: surveybox/web/templates/mail/test.txt +#: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/invitation.txt +#: surveybox/web/templates/mail/invite.txt surveybox/web/templates/mail/participation.txt +#: surveybox/web/templates/mail/password_reset.txt surveybox/web/templates/mail/promoted.txt +#: surveybox/web/templates/mail/register.txt surveybox/web/templates/mail/register_exists.txt +#: surveybox/web/templates/mail/reminder.txt surveybox/web/templates/mail/retention_notice.txt +#: surveybox/web/templates/mail/slot_full.txt surveybox/web/templates/mail/test.txt #, python-format msgid "Hello %(name)s," msgstr "Bonjour %(name)s," @@ -713,12 +722,12 @@ msgstr "Bonjour %(name)s," #: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/mail/deadline.txt #: surveybox/web/templates/mail/digest.txt surveybox/web/templates/mail/guest_erase.txt #: surveybox/web/templates/mail/guest_export.txt surveybox/web/templates/mail/guest_links.txt -#: surveybox/web/templates/mail/guest_receipt.txt surveybox/web/templates/mail/invite.txt -#: surveybox/web/templates/mail/participation.txt surveybox/web/templates/mail/password_reset.txt -#: surveybox/web/templates/mail/promoted.txt surveybox/web/templates/mail/register.txt -#: surveybox/web/templates/mail/register_exists.txt surveybox/web/templates/mail/reminder.txt -#: surveybox/web/templates/mail/retention_notice.txt surveybox/web/templates/mail/slot_full.txt -#: surveybox/web/templates/mail/test.txt +#: surveybox/web/templates/mail/guest_receipt.txt surveybox/web/templates/mail/invitation.txt +#: surveybox/web/templates/mail/invite.txt surveybox/web/templates/mail/participation.txt +#: surveybox/web/templates/mail/password_reset.txt surveybox/web/templates/mail/promoted.txt +#: surveybox/web/templates/mail/register.txt surveybox/web/templates/mail/register_exists.txt +#: surveybox/web/templates/mail/reminder.txt surveybox/web/templates/mail/retention_notice.txt +#: surveybox/web/templates/mail/slot_full.txt surveybox/web/templates/mail/test.txt msgid "Hello," msgstr "Bonjour," @@ -747,8 +756,8 @@ msgid "An entry or date I chose has been removed from a form" msgstr "Une entrée ou une date que j’avais choisie a été supprimée" #: surveybox/mail/notify.py -msgid "Reminder before the end date of a form I was invited to" -msgstr "Rappel avant la date de fin d’un formulaire auquel je suis invité" +msgid "Reminder about a form I was invited to" +msgstr "Rappel concernant un formulaire auquel j’ai été invité" #: surveybox/mail/notify.py msgid "New comments on forms I manage" @@ -1138,6 +1147,14 @@ msgstr "Paramètres de l’historique et de la corbeille modifiés" msgid "Lock of an account lifted" msgstr "Blocage d’un compte levé" +#: surveybox/web/routes/admin.py +msgid "People invited to a form by email" +msgstr "Personnes invitées à un formulaire par e-mail" + +#: surveybox/web/routes/admin.py +msgid "Invitation withdrawn" +msgstr "Invitation retirée" + #: surveybox/web/routes/admin.py msgid "Account deleted" msgstr "Compte supprimé" @@ -1218,7 +1235,7 @@ msgstr "Veuillez d’abord enregistrer les paramètres du relais." msgid "Test message" msgstr "Message de test" -#: surveybox/web/routes/admin_mail.py +#: surveybox/web/routes/admin_mail.py surveybox/web/templates/invitation.html msgid "Invitation" msgstr "Invitation" @@ -1573,11 +1590,21 @@ msgstr "Afficher les inscrits" msgid "Places per person across all participation fields (empty: no limit)" msgstr "Places par personne pour tous les champs de participation (vide : sans limite)" +#: surveybox/web/routes/form_history.py +msgid "Send invitations" +msgstr "Envoyer les invitations" + +#: surveybox/web/routes/form_history.py surveybox/web/templates/form_invitations.html +msgid "First reminder" +msgstr "Premier rappel" + +#: surveybox/web/routes/form_history.py surveybox/web/templates/form_invitations.html +msgid "Last reminder" +msgstr "Dernier rappel" + #: surveybox/web/routes/form_history.py surveybox/web/templates/form_settings.html -msgid "Remind invited people who have not taken part yet … days before the end (empty: no reminder)" -msgstr "" -"Rappeler aux personnes invitées n’ayant pas encore participé … jours avant la fin (vide : aucun " -"rappel)" +msgid "Invite the people and groups of the access list by email" +msgstr "Inviter par e-mail les personnes et groupes de la liste d’accès" #: surveybox/web/routes/form_history.py surveybox/web/templates/form_settings.html msgid "Confirmed dates as calendar" @@ -1620,6 +1647,18 @@ msgstr "Ce formulaire ne peut plus être restauré." msgid "Restored from the form history (state of %(date)s)." msgstr "Restauré depuis l’historique (état du %(date)s)." +#: surveybox/web/routes/form_invitations.py +msgid "Please paste at least one email address." +msgstr "Veuillez coller au moins une adresse e-mail." + +#: surveybox/web/routes/form_invitations.py +msgid "At most 500 addresses at once." +msgstr "500 adresses au maximum à la fois." + +#: surveybox/web/routes/form_invitations.py +msgid "A form can have at most 5000 invitations." +msgstr "Un formulaire peut avoir au maximum 5000 invitations." + #: surveybox/web/routes/form_results.py msgid "Please describe why you change this answer." msgstr "Veuillez indiquer pourquoi vous modifiez cette réponse." @@ -1766,8 +1805,20 @@ msgid "Please enter a valid reply-to address (without a name)." msgstr "Veuillez saisir une adresse de réponse valide (sans nom)." #: surveybox/web/routes/forms.py -msgid "The reminder must be between 1 and 30 days before the end." -msgstr "Le rappel doit avoir lieu entre 1 et 30 jours avant la fin." +msgid "Invitations and reminders cannot be before the start of participation." +msgstr "Les invitations et rappels ne peuvent pas précéder le début de la participation." + +#: surveybox/web/routes/forms.py +msgid "Invitations and reminders must be before the end of participation." +msgstr "Les invitations et rappels doivent précéder la fin de la participation." + +#: surveybox/web/routes/forms.py +msgid "The last reminder must come after the first reminder." +msgstr "Le dernier rappel doit venir après le premier." + +#: surveybox/web/routes/forms.py +msgid "Reminders must come after the invitations." +msgstr "Les rappels doivent venir après les invitations." #: surveybox/web/routes/forms.py msgid "“All signed-in users” is reserved for instance-wide roles. Choose groups or a link." @@ -1796,8 +1847,8 @@ msgid "All signed-in users" msgstr "Tous les utilisateurs connectés" #: surveybox/web/routes/forms.py -msgid "Selected users and groups" -msgstr "Utilisateurs et groupes sélectionnés" +msgid "Only invited people: selected users and groups, guests invited by email" +msgstr "Personnes invitées uniquement : utilisateurs et groupes choisis, invités par e-mail" #: surveybox/web/routes/forms.py msgid "Anyone with the link, also without an account" @@ -3882,6 +3933,10 @@ msgstr "Ce formulaire est fermé. Il n’est plus possible d’envoyer des répo msgid "You have already filled in this form." msgstr "Vous avez déjà rempli ce formulaire." +#: surveybox/web/templates/fill_done.html +msgid "Open the link from your invitation again to view your answer." +msgstr "Ouvrez à nouveau le lien de votre invitation pour voir votre réponse." + #: surveybox/web/templates/fill_done.html surveybox/web/templates/personal.html msgid "Your changes have been saved." msgstr "Vos modifications ont été enregistrées." @@ -4173,7 +4228,7 @@ msgstr "L’e-mail a été mis en file d’attente." msgid "The email could not be sent to this person." msgstr "L’e-mail n’a pas pu être envoyé à cette personne." -#: surveybox/web/templates/followup_recipients.html +#: surveybox/web/templates/followup_recipients.html surveybox/web/templates/form_invitations.html msgid "Taken part" msgstr "Participation" @@ -4296,6 +4351,10 @@ msgstr "Aperçu en direct" msgid "Team" msgstr "Équipe" +#: surveybox/web/templates/form_designer.html surveybox/web/templates/form_invitations.html +msgid "Invitations" +msgstr "Invitations" + #: surveybox/web/templates/form_designer.html surveybox/web/templates/form_history.html #: surveybox/web/templates/form_history_compare.html msgid "History" @@ -4698,6 +4757,155 @@ msgstr "" msgid "Restore selected" msgstr "Restaurer la sélection" +#: surveybox/web/templates/form_invitations.html surveybox/web/templates/question_edit.html +msgid "Dates" +msgstr "Des dates" + +#: surveybox/web/templates/form_invitations.html +msgid "as soon as the form is open" +msgstr "dès que le formulaire est ouvert" + +#: surveybox/web/templates/form_invitations.html +msgid "Access list" +msgstr "Liste d’accès" + +#: surveybox/web/templates/form_invitations.html +msgid "People and groups of the access list are invited by email." +msgstr "Les personnes et groupes de la liste d’accès sont invités par e-mail." + +#: surveybox/web/templates/form_invitations.html +msgid "People and groups of the access list are only reminded, not invited." +msgstr "Les personnes et groupes de la liste d’accès reçoivent seulement des rappels, pas d’invitation." + +#: surveybox/web/templates/form_invitations.html +msgid "Change dates" +msgstr "Modifier les dates" + +#: surveybox/web/templates/form_invitations.html +msgid "Invitations go out once the form is published and open." +msgstr "Les invitations partent dès que le formulaire est publié et ouvert." + +#: surveybox/web/templates/form_invitations.html surveybox/web/templates/form_settings.html +msgid "Invite by email address" +msgstr "Inviter par adresse e-mail" + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d guest invited." +msgid_plural "%(num)d guests invited." +msgstr[0] "%(num)d invité ajouté." +msgstr[1] "%(num)d invités ajoutés." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d person with an account invited." +msgid_plural "%(num)d people with an account invited." +msgstr[0] "%(num)d personne avec un compte invitée." +msgstr[1] "%(num)d personnes avec un compte invitées." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "%(num)d address was already invited." +msgid_plural "%(num)d addresses were already invited." +msgstr[0] "%(num)d adresse était déjà invitée." +msgstr[1] "%(num)d adresses étaient déjà invitées." + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "Not invited, account deactivated: %(list)s" +msgstr "Non invités, compte désactivé : %(list)s" + +#: surveybox/web/templates/form_invitations.html +#, python-format +msgid "Not valid, left in the field below: %(list)s" +msgstr "Non valides, restées dans le champ ci-dessous : %(list)s" + +#: surveybox/web/templates/form_invitations.html +msgid "Email addresses" +msgstr "Adresses e-mail" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"Separated by commas, semicolons or line breaks; copied lists like “Erika Mustermann " +"” work too. Addresses of existing accounts are added to the access list and " +"invited with the normal link (with sign-in). All others are invited as guests: each gets a " +"personal invitation link that opens the form without an account and leads back to their own " +"answer later." +msgstr "" +"Séparées par des virgules, points-virgules ou retours à la ligne ; les listes copiées comme « " +"Erika Mustermann » fonctionnent aussi. Les adresses de comptes existants sont" +" ajoutées à la liste d’accès et invitées avec le lien normal (avec connexion). Toutes les autres " +"sont invitées comme invités : chacune reçoit un lien d’invitation personnel qui ouvre le " +"formulaire sans compte et mène plus tard à sa propre réponse." + +#: surveybox/web/templates/form_invitations.html +msgid "Invite" +msgstr "Inviter" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"This form is anonymous: who has taken part is not shown here. Reminders still go only to people " +"who have not taken part." +msgstr "" +"Ce formulaire est anonyme : qui a participé n’est pas affiché ici. Les rappels ne vont toutefois " +"qu’aux personnes qui n’ont pas participé." + +#: surveybox/web/templates/form_invitations.html +msgid "Guests" +msgstr "Invités" + +#: surveybox/web/templates/form_invitations.html +msgid "Invited" +msgstr "Invité" + +#: surveybox/web/templates/form_invitations.html +msgid "Reminded" +msgstr "Rappelé" + +#: surveybox/web/templates/form_invitations.html +msgid "no more emails" +msgstr "plus d’e-mails" + +#: surveybox/web/templates/form_invitations.html +msgid "planned" +msgstr "prévu" + +#: surveybox/web/templates/form_invitations.html +msgid "yes" +msgstr "oui" + +#: surveybox/web/templates/form_invitations.html +msgid "not yet" +msgstr "pas encore" + +#: surveybox/web/templates/form_invitations.html +msgid "Withdraw" +msgstr "Retirer" + +#: surveybox/web/templates/form_invitations.html +msgid "Withdrawing an invitation makes its link invalid; an answer already given stays." +msgstr "Retirer une invitation rend son lien invalide ; une réponse déjà donnée reste." + +#: surveybox/web/templates/form_invitations.html +msgid "No guests invited yet." +msgstr "Aucun invité pour l’instant." + +#: surveybox/web/templates/form_invitations.html +msgid "People with an account" +msgstr "Personnes avec un compte" + +#: surveybox/web/templates/form_invitations.html +msgid "" +"Accounts appear here once they are invited: added above, or from the access list when invitations" +" go out." +msgstr "" +"Les comptes apparaissent ici dès qu’ils sont invités : ajoutés ci-dessus, ou depuis la liste " +"d’accès à l’envoi des invitations." + +#: surveybox/web/templates/form_invitations.html +msgid "Edit access list" +msgstr "Modifier la liste d’accès" + #: surveybox/web/templates/form_preview.html msgid "Phone" msgstr "Téléphone" @@ -4968,8 +5176,45 @@ msgid "Only needed for “link and password”." msgstr "Nécessaire uniquement pour « lien et mot de passe »." #: surveybox/web/templates/form_settings.html -msgid "For “selected users and groups” you choose them on the next page." -msgstr "Pour « utilisateurs et groupes sélectionnés », vous les choisissez à la page suivante." +msgid "" +"For “only invited people” you choose users and groups on the next page; guests are invited by " +"email under “Invitations”. Personal invitation links open the form with every kind of access." +msgstr "" +"Pour « personnes invitées uniquement », vous choisissez les utilisateurs et groupes à la page " +"suivante ; les invités sont invités par e-mail sous « Invitations ». Les liens d’invitation " +"personnels ouvrent le formulaire quel que soit le type d’accès." + +#: surveybox/web/templates/form_settings.html +msgid "Invitations and reminders" +msgstr "Invitations et rappels" + +#: surveybox/web/templates/form_settings.html +msgid "Guests and accounts you add under “Invitations” are always invited by email." +msgstr "Les invités et comptes que vous ajoutez sous « Invitations » sont toujours invités par e-mail." + +#: surveybox/web/templates/form_settings.html +msgid "Send invitations (empty: as soon as the form is open)" +msgstr "Envoyer les invitations (vide : dès que le formulaire est ouvert)" + +#: surveybox/web/templates/form_settings.html +msgid "First reminder (empty: none)" +msgstr "Premier rappel (vide : aucun)" + +#: surveybox/web/templates/form_settings.html +msgid "Last reminder (empty: none)" +msgstr "Dernier rappel (vide : aucun)" + +#: surveybox/web/templates/form_settings.html +msgid "" +"The dates lie between the start and the end of participation, if those are set; reminders come " +"after the invitation. Reminded are invited people who have not taken part yet and were invited " +"before the reminder. People with an account can switch these emails off in their account, guests " +"with a link in every email." +msgstr "" +"Les dates se situent entre le début et la fin de la participation, si elles sont définies ; les " +"rappels viennent après l’invitation. Sont rappelées les personnes invitées qui n’ont pas encore " +"participé et ont été invitées avant le rappel. Les personnes avec un compte peuvent désactiver " +"ces e-mails dans leur compte, les invités via un lien dans chaque e-mail." #: surveybox/web/templates/form_settings.html msgid "Participation" @@ -4989,14 +5234,6 @@ msgstr "" "Pour les participants connectés et les invités avec leur lien personnel ; pas pour les " "formulaires anonymes." -#: surveybox/web/templates/form_settings.html -msgid "" -"Only for access “Selected users and groups” and with an end date. Each person gets the reminder " -"once, by email; they can switch reminders off in their account." -msgstr "" -"Uniquement pour l’accès « Utilisateurs et groupes sélectionnés » et avec une date de fin. Chaque " -"personne reçoit le rappel une fois par e-mail ; elle peut le désactiver dans son compte." - #: surveybox/web/templates/form_settings.html msgid "Never" msgstr "Jamais" @@ -5486,6 +5723,48 @@ msgstr "connectée et à jour" msgid "not reachable or not up to date" msgstr "inaccessible ou pas à jour" +#: surveybox/web/templates/invitation.html +msgid "This invitation link is not valid (any more). Please ask the person who invited you." +msgstr "" +"Ce lien d’invitation n’est pas (ou plus) valide. Veuillez vous adresser à la personne qui vous a " +"invité." + +#: surveybox/web/templates/invitation.html +#, python-format +msgid "" +"Your invitation to “%(title)s” and your address in it have been deleted. You will not receive any" +" further emails about it." +msgstr "" +"Votre invitation à « %(title)s » et votre adresse ont été supprimées. Vous ne recevrez plus " +"d’e-mails à ce sujet." + +#: surveybox/web/templates/invitation.html +#, python-format +msgid "Invitation to “%(title)s”" +msgstr "Invitation à « %(title)s »" + +#: surveybox/web/templates/invitation.html +msgid "You will not receive any further emails about this invitation. Your invitation link still works." +msgstr "" +"Vous ne recevrez plus d’e-mails concernant cette invitation. Votre lien d’invitation fonctionne " +"toujours." + +#: surveybox/web/templates/invitation.html +msgid "No further emails about this invitation" +msgstr "Plus d’e-mails concernant cette invitation" + +#: surveybox/web/templates/invitation.html +msgid "" +"You can also delete the invitation with your address. The organisers then no longer see it, and " +"the invitation link stops working; an answer you already gave stays." +msgstr "" +"Vous pouvez aussi supprimer l’invitation avec votre adresse. Les organisateurs ne la voient plus " +"et le lien d’invitation ne fonctionne plus ; une réponse déjà donnée reste." + +#: surveybox/web/templates/invitation.html +msgid "Delete invitation and address" +msgstr "Supprimer l’invitation et l’adresse" + #: surveybox/web/templates/login.html surveybox/web/templates/login_mfa.html msgid "or" msgstr "ou" @@ -5837,10 +6116,6 @@ msgstr "Les options sont" msgid "Texts" msgstr "Des textes" -#: surveybox/web/templates/question_edit.html -msgid "Dates" -msgstr "Des dates" - #: surveybox/web/templates/question_edit.html msgid "Answers per option" msgstr "Réponses par option" @@ -6570,6 +6845,41 @@ msgstr "" msgid "Without confirmation you get no further emails, and your address is deleted after 7 days." msgstr "Sans confirmation, vous ne recevez plus d’e-mails et votre adresse est supprimée après 7 jours." +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "Invitation: %(title)s" +msgstr "Invitation : %(title)s" + +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "You are invited to take part in “%(title)s”." +msgstr "Vous êtes invité à participer à « %(title)s »." + +#: surveybox/web/templates/mail/invitation.txt +#, python-format +msgid "The form is open until %(date)s." +msgstr "Le formulaire est ouvert jusqu’au %(date)s." + +#: surveybox/web/templates/mail/invitation.txt +msgid "Your personal link (no account needed):" +msgstr "Votre lien personnel (aucun compte nécessaire) :" + +#: surveybox/web/templates/mail/invitation.txt +msgid "" +"The link is meant for you only: with it you can also view and, if the form allows it, change your" +" answer later." +msgstr "" +"Ce lien vous est réservé : il vous permet aussi de consulter plus tard votre réponse et, si le " +"formulaire le permet, de la modifier." + +#: surveybox/web/templates/mail/invitation.txt surveybox/web/templates/mail/reminder.txt +msgid "If you do not want any further emails about this invitation:" +msgstr "Si vous ne souhaitez plus recevoir d’e-mails concernant cette invitation :" + +#: surveybox/web/templates/mail/invitation.txt +msgid "Please sign in to take part:" +msgstr "Veuillez vous connecter pour participer :" + #: surveybox/web/templates/mail/invite.txt #, python-format msgid "Your access to %(app)s" @@ -6680,6 +6990,11 @@ msgstr "" "vous êtes invité à « %(title)s » et n’avez pas encore participé. Le formulaire est ouvert " "jusqu’au %(date)s." +#: surveybox/web/templates/mail/reminder.txt +#, python-format +msgid "You have been invited to “%(title)s” and have not taken part yet." +msgstr "Vous avez été invité à « %(title)s » et n’avez pas encore participé." + #: surveybox/web/templates/mail/retention_notice.txt #, python-format msgid "Retention period ends soon: %(title)s" diff --git a/surveybox/locale/messages.pot b/surveybox/locale/messages.pot index efdd046..c9e8747 100644 --- a/surveybox/locale/messages.pot +++ b/surveybox/locale/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-11-26 09:14+0100\n" +"POT-Creation-Date: 2026-11-26 09:45+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -69,7 +69,7 @@ msgid "" "1, at least 3 : 1 is needed for markings)." msgstr "" -#: surveybox/forms/booking.py:170 surveybox/forms/evaluation.py:193 +#: surveybox/forms/booking.py:170 surveybox/forms/evaluation.py:192 #: surveybox/forms/export.py:133 #: surveybox/web/templates/followup_recipients.html:25 #: surveybox/web/templates/form_comments.html:12 @@ -122,7 +122,7 @@ msgstr "" #: surveybox/forms/conditions.py:452 surveybox/forms/evaluation.py:82 #: surveybox/forms/export.py:85 surveybox/forms/summary.py:73 #: surveybox/forms/types.py:775 surveybox/forms/types.py:798 -#: surveybox/web/routes/forms.py:320 +#: surveybox/web/routes/forms.py:326 #: surveybox/web/templates/_fill_fields.html:89 #: surveybox/web/templates/_fill_fields.html:198 #: surveybox/web/templates/_fill_fields.html:371 @@ -136,29 +136,29 @@ msgstr "" #: surveybox/forms/conditions.py:452 surveybox/forms/evaluation.py:83 #: surveybox/forms/export.py:85 surveybox/forms/summary.py:74 #: surveybox/forms/types.py:776 surveybox/forms/types.py:798 -#: surveybox/web/routes/forms.py:320 +#: surveybox/web/routes/forms.py:326 #: surveybox/web/templates/_fill_fields.html:90 #: surveybox/web/templates/_fill_fields.html:198 #: surveybox/web/templates/_fill_fields.html:372 #: surveybox/web/templates/_fill_fields.html:409 #: surveybox/web/templates/form_history_compare.html:7 #: surveybox/web/templates/form_responses.html:82 -#: surveybox/web/templates/form_settings.html:57 -#: surveybox/web/templates/form_settings.html:79 +#: surveybox/web/templates/form_settings.html:71 +#: surveybox/web/templates/form_settings.html:90 #: surveybox/web/templates/results_public.html:21 msgid "No" msgstr "" #: surveybox/forms/conditions.py:454 surveybox/forms/evaluation.py:87 -#: surveybox/forms/evaluation.py:184 surveybox/forms/export.py:94 +#: surveybox/forms/evaluation.py:183 surveybox/forms/export.py:94 #: surveybox/forms/summary.py:134 surveybox/forms/types.py:792 -#: surveybox/web/routes/forms.py:327 +#: surveybox/web/routes/forms.py:333 msgid "signed up" msgstr "" #: surveybox/forms/conditions.py:456 surveybox/forms/summary.py:92 #: surveybox/forms/types.py:782 surveybox/forms/types.py:788 -#: surveybox/web/routes/forms.py:320 +#: surveybox/web/routes/forms.py:326 #: surveybox/web/templates/_fill_fields.html:96 #: surveybox/web/templates/_fill_fields.html:97 #: surveybox/web/templates/_fill_fields.html:106 @@ -188,7 +188,7 @@ msgstr "" msgid "Hidden if at least one applies:" msgstr "" -#: surveybox/forms/evaluation.py:228 +#: surveybox/forms/evaluation.py:227 msgid "Participants" msgstr "" @@ -208,6 +208,7 @@ msgstr "" #: surveybox/web/templates/admin_users.html:18 #: surveybox/web/templates/admin_users.html:48 #: surveybox/web/templates/forgot.html:14 +#: surveybox/web/templates/form_invitations.html:54 #: surveybox/web/templates/guest_links.html:13 #: surveybox/web/templates/guest_links.html:28 #: surveybox/web/templates/guest_links.html:42 @@ -309,6 +310,8 @@ msgid "Answer filter" msgstr "" #: surveybox/forms/export.py:272 +#: surveybox/web/templates/form_invitations.html:14 +#: surveybox/web/templates/form_invitations.html:15 msgid "none" msgstr "" @@ -350,6 +353,7 @@ msgstr "" #: surveybox/web/templates/admin_user_edit.html:23 #: surveybox/web/templates/admin_user_new.html:12 #: surveybox/web/templates/admin_users.html:18 +#: surveybox/web/templates/form_invitations.html:83 #: surveybox/web/templates/register.html:16 msgid "Name" msgstr "" @@ -641,118 +645,127 @@ msgstr "" msgid "Chosen entry or date removed" msgstr "" -#: surveybox/mail/custom.py:50 -msgid "Reminder before the end date" +#: surveybox/mail/custom.py:50 surveybox/mail/notify.py:82 +msgid "Invitation to a form" msgstr "" -#: surveybox/mail/custom.py:51 surveybox/web/routes/admin_mail.py:40 +#: surveybox/mail/custom.py:51 +msgid "Reminder to invited people" +msgstr "" + +#: surveybox/mail/custom.py:52 surveybox/web/routes/admin_mail.py:40 msgid "Comment published" msgstr "" -#: surveybox/mail/custom.py:52 +#: surveybox/mail/custom.py:53 msgid "New comment (managers)" msgstr "" -#: surveybox/mail/custom.py:53 +#: surveybox/mail/custom.py:54 msgid "Entry booked up (owner)" msgstr "" -#: surveybox/mail/custom.py:54 +#: surveybox/mail/custom.py:55 msgid "Form has reached its end date (owner)" msgstr "" -#: surveybox/mail/custom.py:55 +#: surveybox/mail/custom.py:56 msgid "Daily summary (managers)" msgstr "" -#: surveybox/mail/custom.py:56 +#: surveybox/mail/custom.py:57 msgid "Retention period ends soon (owner)" msgstr "" -#: surveybox/mail/custom.py:61 +#: surveybox/mail/custom.py:62 msgid "name of the recipient (may be empty)" msgstr "" -#: surveybox/mail/custom.py:62 +#: surveybox/mail/custom.py:63 msgid "the main link of this email" msgstr "" -#: surveybox/mail/custom.py:63 +#: surveybox/mail/custom.py:64 msgid "link to confirm the email address (only if one is needed)" msgstr "" -#: surveybox/mail/custom.py:64 +#: surveybox/mail/custom.py:65 msgid "the entry concerned" msgstr "" -#: surveybox/mail/custom.py:65 +#: surveybox/mail/custom.py:66 msgid "end date of the form" msgstr "" -#: surveybox/mail/custom.py:66 +#: surveybox/mail/custom.py:67 msgid "date of the deletion" msgstr "" -#: surveybox/mail/custom.py:67 +#: surveybox/mail/custom.py:68 msgid "number of answers" msgstr "" -#: surveybox/mail/custom.py:68 +#: surveybox/mail/custom.py:69 msgid "page to request personal links again" msgstr "" -#: surveybox/mail/custom.py:69 +#: surveybox/mail/custom.py:70 msgid "page “Forgot password”" msgstr "" -#: surveybox/mail/custom.py:70 +#: surveybox/mail/custom.py:71 msgid "sign-in page" msgstr "" -#: surveybox/mail/custom.py:71 +#: surveybox/mail/custom.py:72 msgid "settings of the form" msgstr "" -#: surveybox/mail/custom.py:76 -msgid "greeting, e.g. “Hello Erika,”" -msgstr "" - -#: surveybox/mail/custom.py:77 -msgid "the standard text of this email without the greeting" +#: surveybox/mail/custom.py:73 +msgid "link to stop emails about an invitation (guests only)" msgstr "" #: surveybox/mail/custom.py:78 +msgid "greeting, e.g. “Hello Erika,”" +msgstr "" + +#: surveybox/mail/custom.py:79 +msgid "the standard text of this email without the greeting" +msgstr "" + +#: surveybox/mail/custom.py:80 msgid "name of the application" msgstr "" -#: surveybox/mail/custom.py:105 +#: surveybox/mail/custom.py:107 msgid "title of the form" msgstr "" -#: surveybox/mail/custom.py:170 +#: surveybox/mail/custom.py:172 msgid "Please enter a subject (one line, at most 200 characters)." msgstr "" -#: surveybox/mail/custom.py:171 +#: surveybox/mail/custom.py:173 msgid "Please enter a text (at most 10,000 characters)." msgstr "" -#: surveybox/mail/custom.py:172 +#: surveybox/mail/custom.py:174 #, python-format msgid "Unknown placeholders: %(names)s" msgstr "" -#: surveybox/mail/custom.py:173 +#: surveybox/mail/custom.py:175 #, python-brace-format, python-format msgid "The text must contain {details} or these placeholders: %(names)s" msgstr "" -#: surveybox/mail/custom.py:206 surveybox/web/templates/mail/changed.txt:2 +#: surveybox/mail/custom.py:208 surveybox/web/templates/mail/changed.txt:2 #: surveybox/web/templates/mail/comment_new.txt:2 #: surveybox/web/templates/mail/comment_published.txt:2 #: surveybox/web/templates/mail/confirmed.txt:2 #: surveybox/web/templates/mail/deadline.txt:2 #: surveybox/web/templates/mail/digest.txt:2 +#: surveybox/web/templates/mail/invitation.txt:2 #: surveybox/web/templates/mail/invite.txt:2 #: surveybox/web/templates/mail/participation.txt:2 #: surveybox/web/templates/mail/password_reset.txt:2 @@ -767,7 +780,7 @@ msgstr "" msgid "Hello %(name)s," msgstr "" -#: surveybox/mail/custom.py:207 surveybox/web/templates/mail/changed.txt:2 +#: surveybox/mail/custom.py:209 surveybox/web/templates/mail/changed.txt:2 #: surveybox/web/templates/mail/comment_new.txt:2 #: surveybox/web/templates/mail/comment_published.txt:2 #: surveybox/web/templates/mail/confirmed.txt:2 @@ -777,6 +790,7 @@ msgstr "" #: surveybox/web/templates/mail/guest_export.txt:2 #: surveybox/web/templates/mail/guest_links.txt:2 #: surveybox/web/templates/mail/guest_receipt.txt:6 +#: surveybox/web/templates/mail/invitation.txt:2 #: surveybox/web/templates/mail/invite.txt:2 #: surveybox/web/templates/mail/participation.txt:2 #: surveybox/web/templates/mail/password_reset.txt:2 @@ -814,8 +828,8 @@ msgstr "" msgid "An entry or date I chose has been removed from a form" msgstr "" -#: surveybox/mail/notify.py:82 -msgid "Reminder before the end date of a form I was invited to" +#: surveybox/mail/notify.py:83 +msgid "Reminder about a form I was invited to" msgstr "" #: surveybox/mail/notify.py:84 @@ -1219,54 +1233,62 @@ msgid "Lock of an account lifted" msgstr "" #: surveybox/web/routes/admin.py:98 -msgid "Account deleted" +msgid "People invited to a form by email" msgstr "" #: surveybox/web/routes/admin.py:99 -msgid "Own data downloaded" +msgid "Invitation withdrawn" msgstr "" #: surveybox/web/routes/admin.py:100 -msgid "Data of a user exported" +msgid "Account deleted" msgstr "" #: surveybox/web/routes/admin.py:101 -msgid "Data of a guest address exported" +msgid "Own data downloaded" msgstr "" #: surveybox/web/routes/admin.py:102 -msgid "Guest downloaded their data" +msgid "Data of a user exported" msgstr "" #: surveybox/web/routes/admin.py:103 -msgid "Logo changed" +msgid "Data of a guest address exported" msgstr "" #: surveybox/web/routes/admin.py:104 -msgid "Design changed" +msgid "Guest downloaded their data" msgstr "" #: surveybox/web/routes/admin.py:105 -msgid "Email template changed" +msgid "Logo changed" msgstr "" #: surveybox/web/routes/admin.py:106 -msgid "Answers exported" +msgid "Design changed" msgstr "" #: surveybox/web/routes/admin.py:107 -msgid "Answer deleted by a manager" +msgid "Email template changed" msgstr "" #: surveybox/web/routes/admin.py:108 -msgid "Answer changed by a manager" +msgid "Answers exported" msgstr "" #: surveybox/web/routes/admin.py:109 +msgid "Answer deleted by a manager" +msgstr "" + +#: surveybox/web/routes/admin.py:110 +msgid "Answer changed by a manager" +msgstr "" + +#: surveybox/web/routes/admin.py:111 msgid "Guest address and its answers deleted" msgstr "" -#: surveybox/web/routes/admin.py:183 +#: surveybox/web/routes/admin.py:185 msgid "A chosen group does not fit this user type." msgstr "" @@ -1302,6 +1324,8 @@ msgid "Test message" msgstr "" #: surveybox/web/routes/admin_mail.py:34 +#: surveybox/web/templates/invitation.html:2 +#: surveybox/web/templates/invitation.html:6 msgid "Invitation" msgstr "" @@ -1404,7 +1428,7 @@ msgstr "" msgid "Email or password is wrong, or the account is temporarily locked." msgstr "" -#: surveybox/web/routes/auth.py:30 surveybox/web/routes/fill.py:58 +#: surveybox/web/routes/auth.py:30 surveybox/web/routes/fill.py:59 #: surveybox/web/routes/passkeys.py:40 msgid "Too many attempts. Please wait a few minutes and try again." msgstr "" @@ -1441,35 +1465,35 @@ msgstr "" msgid "The password is too simple." msgstr "" -#: surveybox/web/routes/fill.py:57 +#: surveybox/web/routes/fill.py:58 msgid "The password is wrong." msgstr "" -#: surveybox/web/routes/fill.py:59 surveybox/web/templates/fill.html:76 +#: surveybox/web/routes/fill.py:60 surveybox/web/templates/fill.html:76 msgid "Please confirm the consent." msgstr "" -#: surveybox/web/routes/fill.py:103 +#: surveybox/web/routes/fill.py:117 msgid "Please write a comment." msgstr "" -#: surveybox/web/routes/fill.py:104 +#: surveybox/web/routes/fill.py:118 msgid "The comment is too long (at most 2000 characters)." msgstr "" -#: surveybox/web/routes/fill.py:105 +#: surveybox/web/routes/fill.py:119 msgid "Please enter your name." msgstr "" -#: surveybox/web/routes/fill.py:106 +#: surveybox/web/routes/fill.py:120 msgid "You have written many comments in a short time. Please wait a while." msgstr "" -#: surveybox/web/routes/fill.py:107 +#: surveybox/web/routes/fill.py:121 msgid "You can only change your own comments." msgstr "" -#: surveybox/web/routes/fill.py:108 +#: surveybox/web/routes/fill.py:122 msgid "Comments are switched off for this form." msgstr "" @@ -1527,7 +1551,7 @@ msgstr "" msgid "Only manually" msgstr "" -#: surveybox/web/routes/form_followups.py:51 surveybox/web/routes/forms.py:131 +#: surveybox/web/routes/form_followups.py:51 surveybox/web/routes/forms.py:137 msgid "The input could not be processed." msgstr "" @@ -1616,7 +1640,7 @@ msgstr "" #: surveybox/web/routes/form_history.py:40 #: surveybox/web/templates/form_access.html:6 -#: surveybox/web/templates/form_designer.html:70 +#: surveybox/web/templates/form_designer.html:71 #: surveybox/web/templates/form_settings.html:35 msgid "Who may fill in" msgstr "" @@ -1627,69 +1651,81 @@ msgid "Password for access via link" msgstr "" #: surveybox/web/routes/form_history.py:42 -#: surveybox/web/templates/form_settings.html:50 +#: surveybox/web/templates/form_settings.html:64 msgid "A person may fill in the form several times" msgstr "" #: surveybox/web/routes/form_history.py:43 -#: surveybox/web/templates/form_settings.html:54 +#: surveybox/web/templates/form_settings.html:68 msgid "Participants may change their answer" msgstr "" #: surveybox/web/routes/form_history.py:44 -#: surveybox/web/templates/form_settings.html:128 +#: surveybox/web/templates/form_settings.html:139 msgid "Email address of guests" msgstr "" #: surveybox/web/routes/form_history.py:45 -#: surveybox/web/templates/form_settings.html:63 +#: surveybox/web/templates/form_settings.html:74 msgid "Participants see the results" msgstr "" #: surveybox/web/routes/form_history.py:46 -#: surveybox/web/templates/form_settings.html:119 +#: surveybox/web/templates/form_settings.html:130 msgid "Retention period in days after the end of the form" msgstr "" #: surveybox/web/routes/form_history.py:47 -#: surveybox/web/templates/form_settings.html:123 +#: surveybox/web/templates/form_settings.html:134 msgid "When the retention period ends or a participant is deleted" msgstr "" #: surveybox/web/routes/form_history.py:48 -#: surveybox/web/templates/form_settings.html:114 +#: surveybox/web/templates/form_settings.html:125 msgid "Privacy notice shown with the form (optional)" msgstr "" #: surveybox/web/routes/form_history.py:49 -#: surveybox/web/templates/form_settings.html:116 +#: surveybox/web/templates/form_settings.html:127 msgid "Participants must give their consent" msgstr "" #: surveybox/web/routes/form_history.py:50 -#: surveybox/web/templates/form_settings.html:117 +#: surveybox/web/templates/form_settings.html:128 msgid "Consent text" msgstr "" #: surveybox/web/routes/form_history.py:51 -#: surveybox/web/templates/form_settings.html:77 +#: surveybox/web/templates/form_settings.html:88 msgid "Show who has signed up" msgstr "" #: surveybox/web/routes/form_history.py:53 -#: surveybox/web/templates/form_settings.html:74 +#: surveybox/web/templates/form_settings.html:85 msgid "Places per person across all participation fields (empty: no limit)" msgstr "" +#: surveybox/web/routes/form_history.py:54 +msgid "Send invitations" +msgstr "" + #: surveybox/web/routes/form_history.py:55 -#: surveybox/web/templates/form_settings.html:60 -msgid "" -"Remind invited people who have not taken part yet … days before the end " -"(empty: no reminder)" +#: surveybox/web/templates/form_invitations.html:14 +msgid "First reminder" +msgstr "" + +#: surveybox/web/routes/form_history.py:56 +#: surveybox/web/templates/form_invitations.html:15 +msgid "Last reminder" +msgstr "" + +#: surveybox/web/routes/form_history.py:57 +#: surveybox/web/templates/form_settings.html:50 +msgid "Invite the people and groups of the access list by email" msgstr "" #: surveybox/web/routes/form_history.py:58 -#: surveybox/web/templates/form_settings.html:86 +#: surveybox/web/templates/form_settings.html:97 msgid "Confirmed dates as calendar" msgstr "" @@ -1697,23 +1733,23 @@ msgstr "" #: surveybox/web/templates/_comments.html:4 #: surveybox/web/templates/form_comments.html:2 #: surveybox/web/templates/form_comments.html:6 -#: surveybox/web/templates/form_designer.html:34 -#: surveybox/web/templates/form_settings.html:99 +#: surveybox/web/templates/form_designer.html:35 +#: surveybox/web/templates/form_settings.html:110 msgid "Comments" msgstr "" #: surveybox/web/routes/form_history.py:61 -#: surveybox/web/templates/form_settings.html:103 +#: surveybox/web/templates/form_settings.html:114 msgid "Publish comments without the author’s name (managers still see it)" msgstr "" #: surveybox/web/routes/form_history.py:62 -#: surveybox/web/templates/form_settings.html:107 +#: surveybox/web/templates/form_settings.html:118 msgid "Reply-to address for messages about this form (optional)" msgstr "" #: surveybox/web/routes/form_history.py:63 -#: surveybox/web/templates/form_settings.html:104 +#: surveybox/web/templates/form_settings.html:115 msgid "Notify managers about new comments by email" msgstr "" @@ -1725,19 +1761,31 @@ msgstr "" msgid "Group" msgstr "" -#: surveybox/web/routes/form_history.py:73 +#: surveybox/web/routes/form_history.py:74 msgid "Please choose at least one change to restore." msgstr "" -#: surveybox/web/routes/form_history.py:74 surveybox/web/routes/forms.py:181 +#: surveybox/web/routes/form_history.py:75 surveybox/web/routes/forms.py:187 msgid "This form can no longer be restored." msgstr "" -#: surveybox/web/routes/form_history.py:153 +#: surveybox/web/routes/form_history.py:154 #, python-format msgid "Restored from the form history (state of %(date)s)." msgstr "" +#: surveybox/web/routes/form_invitations.py:23 +msgid "Please paste at least one email address." +msgstr "" + +#: surveybox/web/routes/form_invitations.py:24 +msgid "At most 500 addresses at once." +msgstr "" + +#: surveybox/web/routes/form_invitations.py:25 +msgid "A form can have at most 5000 invitations." +msgstr "" + #: surveybox/web/routes/form_results.py:220 msgid "Please describe why you change this answer." msgstr "" @@ -1784,7 +1832,7 @@ msgid "Please set a password for access via link." msgstr "" #: surveybox/web/routes/forms.py:61 -#: surveybox/web/templates/form_settings.html:53 +#: surveybox/web/templates/form_settings.html:67 msgid "Anonymity cannot be changed once answers exist." msgstr "" @@ -1885,88 +1933,100 @@ msgstr "" msgid "Please enter a valid reply-to address (without a name)." msgstr "" -#: surveybox/web/routes/forms.py:89 -msgid "The reminder must be between 1 and 30 days before the end." +#: surveybox/web/routes/forms.py:90 +msgid "Invitations and reminders cannot be before the start of participation." msgstr "" -#: surveybox/web/routes/forms.py:91 +#: surveybox/web/routes/forms.py:92 +msgid "Invitations and reminders must be before the end of participation." +msgstr "" + +#: surveybox/web/routes/forms.py:93 +msgid "The last reminder must come after the first reminder." +msgstr "" + +#: surveybox/web/routes/forms.py:94 +msgid "Reminders must come after the invitations." +msgstr "" + +#: surveybox/web/routes/forms.py:96 msgid "" "“All signed-in users” is reserved for instance-wide roles. Choose groups " "or a link." msgstr "" -#: surveybox/web/routes/forms.py:96 +#: surveybox/web/routes/forms.py:101 msgid "Draft" msgstr "" -#: surveybox/web/routes/forms.py:97 +#: surveybox/web/routes/forms.py:102 msgid "Scheduled" msgstr "" -#: surveybox/web/routes/forms.py:98 +#: surveybox/web/routes/forms.py:103 msgid "Open" msgstr "" -#: surveybox/web/routes/forms.py:99 +#: surveybox/web/routes/forms.py:104 msgid "Closed" msgstr "" -#: surveybox/web/routes/forms.py:103 +#: surveybox/web/routes/forms.py:108 msgid "All signed-in users" msgstr "" -#: surveybox/web/routes/forms.py:104 -msgid "Selected users and groups" +#: surveybox/web/routes/forms.py:110 +msgid "Only invited people: selected users and groups, guests invited by email" msgstr "" -#: surveybox/web/routes/forms.py:105 +#: surveybox/web/routes/forms.py:111 msgid "Anyone with the link, also without an account" msgstr "" -#: surveybox/web/routes/forms.py:106 +#: surveybox/web/routes/forms.py:112 msgid "Anyone with the link and the password" msgstr "" -#: surveybox/web/routes/forms.py:112 +#: surveybox/web/routes/forms.py:118 msgid "Please describe the image in a few words (for screen readers)." msgstr "" -#: surveybox/web/routes/forms.py:113 +#: surveybox/web/routes/forms.py:119 msgid "At most 12 images per question." msgstr "" -#: surveybox/web/routes/forms.py:114 +#: surveybox/web/routes/forms.py:120 msgid "Please choose a video file." msgstr "" -#: surveybox/web/routes/forms.py:115 +#: surveybox/web/routes/forms.py:121 msgid "This video address was not recognised." msgstr "" -#: surveybox/web/routes/forms.py:117 +#: surveybox/web/routes/forms.py:123 msgid "" "Videos from this provider are not enabled. An administrator can enable " "them." msgstr "" -#: surveybox/web/routes/forms.py:122 +#: surveybox/web/routes/forms.py:128 #: surveybox/web/templates/form_responses.html:160 msgid "PDF" msgstr "" -#: surveybox/web/routes/forms.py:123 +#: surveybox/web/routes/forms.py:129 msgid "Images (JPEG, PNG, WebP)" msgstr "" -#: surveybox/web/routes/forms.py:124 +#: surveybox/web/routes/forms.py:130 msgid "Office documents (Word, Excel, PowerPoint, OpenDocument)" msgstr "" -#: surveybox/web/routes/forms.py:125 +#: surveybox/web/routes/forms.py:131 msgid "Text and CSV" msgstr "" -#: surveybox/web/routes/forms.py:126 +#: surveybox/web/routes/forms.py:132 msgid "ZIP archives" msgstr "" @@ -2070,7 +2130,7 @@ msgstr "" #: surveybox/web/templates/admin_user_edit.html:32 #: surveybox/web/templates/followup_edit.html:57 #: surveybox/web/templates/form_access.html:26 -#: surveybox/web/templates/form_designer.html:50 +#: surveybox/web/templates/form_designer.html:51 #: surveybox/web/templates/personal.html:59 #: surveybox/web/templates/question_edit.html:276 #: surveybox/web/templates/question_edit.html:298 @@ -3531,7 +3591,7 @@ msgid "Load only after a click (recommended for servers of third parties)" msgstr "" #: surveybox/web/templates/admin_settings.html:46 -#: surveybox/web/templates/form_settings.html:144 +#: surveybox/web/templates/form_settings.html:155 msgid "Save settings" msgstr "" @@ -3970,7 +4030,7 @@ msgstr "" #: surveybox/web/templates/fill.html:18 #: surveybox/web/templates/fill_closed.html:13 -#: surveybox/web/templates/fill_done.html:43 +#: surveybox/web/templates/fill_done.html:44 #: surveybox/web/templates/personal.html:39 msgid "Show results" msgstr "" @@ -4075,50 +4135,54 @@ msgstr "" msgid "You have already filled in this form." msgstr "" -#: surveybox/web/templates/fill_done.html:11 +#: surveybox/web/templates/fill_done.html:10 +msgid "Open the link from your invitation again to view your answer." +msgstr "" + +#: surveybox/web/templates/fill_done.html:12 #: surveybox/web/templates/personal.html:18 msgid "Your changes have been saved." msgstr "" -#: surveybox/web/templates/fill_done.html:13 +#: surveybox/web/templates/fill_done.html:14 msgid "Thank you! Your answers have been submitted." msgstr "" -#: surveybox/web/templates/fill_done.html:16 +#: surveybox/web/templates/fill_done.html:17 msgid "" "Please confirm your email address with the link in the email we have just" " sent you. Only then do you receive the further information the " "organisers plan to send by email." msgstr "" -#: surveybox/web/templates/fill_done.html:18 +#: surveybox/web/templates/fill_done.html:19 msgid "" "You took part without an email address, so you do not receive the further" " information the organisers plan to send by email." msgstr "" -#: surveybox/web/templates/fill_done.html:22 +#: surveybox/web/templates/fill_done.html:23 msgid "Your personal link" msgstr "" -#: surveybox/web/templates/fill_done.html:23 +#: surveybox/web/templates/fill_done.html:24 msgid "" "With this link you can view your answer and, if the form allows it, " "change or delete it. It is shown only now: save it as a bookmark or copy " "it." msgstr "" -#: surveybox/web/templates/fill_done.html:25 +#: surveybox/web/templates/fill_done.html:26 msgid "" "Keep this link to yourself: anyone who has it can see your answer. If you" " entered your email address, the link is also in the confirmation email." msgstr "" -#: surveybox/web/templates/fill_done.html:29 +#: surveybox/web/templates/fill_done.html:30 msgid "Change my answers" msgstr "" -#: surveybox/web/templates/fill_done.html:32 +#: surveybox/web/templates/fill_done.html:33 #: surveybox/web/templates/followup_edit.html:24 #: surveybox/web/templates/followup_edit.html:31 #: surveybox/web/templates/followup_edit.html:64 @@ -4127,11 +4191,11 @@ msgstr "" msgid "Documents" msgstr "" -#: surveybox/web/templates/fill_done.html:40 +#: surveybox/web/templates/fill_done.html:41 msgid "Add confirmed dates to my calendar" msgstr "" -#: surveybox/web/templates/fill_done.html:46 +#: surveybox/web/templates/fill_done.html:47 msgid "Fill in again" msgstr "" @@ -4149,7 +4213,7 @@ msgid "Follow-up email" msgstr "" #: surveybox/web/templates/followup_edit.html:7 -#: surveybox/web/templates/form_designer.html:33 +#: surveybox/web/templates/form_designer.html:34 #: surveybox/web/templates/form_followups.html:2 #: surveybox/web/templates/form_followups.html:7 msgid "Follow-up emails" @@ -4359,6 +4423,8 @@ msgid "The email could not be sent to this person." msgstr "" #: surveybox/web/templates/followup_recipients.html:17 +#: surveybox/web/templates/form_invitations.html:54 +#: surveybox/web/templates/form_invitations.html:83 msgid "Taken part" msgstr "" @@ -4481,6 +4547,13 @@ msgid "Team" msgstr "" #: surveybox/web/templates/form_designer.html:32 +#: surveybox/web/templates/form_invitations.html:2 +#: surveybox/web/templates/form_invitations.html:8 +#: surveybox/web/templates/form_invitations.html:13 +msgid "Invitations" +msgstr "" + +#: surveybox/web/templates/form_designer.html:33 #: surveybox/web/templates/form_history.html:2 #: surveybox/web/templates/form_history.html:6 #: surveybox/web/templates/form_history_compare.html:2 @@ -4488,180 +4561,180 @@ msgstr "" msgid "History" msgstr "" -#: surveybox/web/templates/form_designer.html:34 +#: surveybox/web/templates/form_designer.html:35 #, python-format msgid "%(num)d new" msgid_plural "%(num)d new" msgstr[0] "" msgstr[1] "" -#: surveybox/web/templates/form_designer.html:37 +#: surveybox/web/templates/form_designer.html:38 msgid "Copy template" msgstr "" -#: surveybox/web/templates/form_designer.html:37 +#: surveybox/web/templates/form_designer.html:38 msgid "Copy" msgstr "" -#: surveybox/web/templates/form_designer.html:41 +#: surveybox/web/templates/form_designer.html:42 msgid "Save as template" msgstr "" -#: surveybox/web/templates/form_designer.html:49 +#: surveybox/web/templates/form_designer.html:50 msgid "Available to all creators" msgstr "" -#: surveybox/web/templates/form_designer.html:58 +#: surveybox/web/templates/form_designer.html:59 msgid "Publish" msgstr "" -#: surveybox/web/templates/form_designer.html:61 +#: surveybox/web/templates/form_designer.html:62 msgid "Close" msgstr "" -#: surveybox/web/templates/form_designer.html:64 +#: surveybox/web/templates/form_designer.html:65 msgid "Reopen" msgstr "" -#: surveybox/web/templates/form_designer.html:71 +#: surveybox/web/templates/form_designer.html:72 msgid "Opens" msgstr "" -#: surveybox/web/templates/form_designer.html:72 +#: surveybox/web/templates/form_designer.html:73 msgid "Closes" msgstr "" -#: surveybox/web/templates/form_designer.html:73 +#: surveybox/web/templates/form_designer.html:74 msgid "Link" msgstr "" -#: surveybox/web/templates/form_designer.html:76 +#: surveybox/web/templates/form_designer.html:77 msgid "Available after publishing." msgstr "" -#: surveybox/web/templates/form_designer.html:82 +#: surveybox/web/templates/form_designer.html:83 msgid "Embed" msgstr "" -#: surveybox/web/templates/form_designer.html:84 +#: surveybox/web/templates/form_designer.html:85 msgid "" "Only on pages that the administrator has allowed for embedding and that " "belong to the same domain (e.g. the Nextcloud). Elsewhere, browsers block" " the cookies the form needs: link to the form there instead." msgstr "" -#: surveybox/web/templates/form_designer.html:90 +#: surveybox/web/templates/form_designer.html:91 msgid "Questions" msgstr "" -#: surveybox/web/templates/form_designer.html:92 +#: surveybox/web/templates/form_designer.html:93 msgid "No questions yet. Add the first one below." msgstr "" -#: surveybox/web/templates/form_designer.html:94 +#: surveybox/web/templates/form_designer.html:95 msgid "Order saved." msgstr "" -#: surveybox/web/templates/form_designer.html:98 +#: surveybox/web/templates/form_designer.html:99 msgid "Drag to move, or use the arrow keys" msgstr "" -#: surveybox/web/templates/form_designer.html:98 +#: surveybox/web/templates/form_designer.html:99 msgid "Drag to move" msgstr "" -#: surveybox/web/templates/form_designer.html:101 +#: surveybox/web/templates/form_designer.html:102 msgid "required" msgstr "" -#: surveybox/web/templates/form_designer.html:102 +#: surveybox/web/templates/form_designer.html:103 msgid "personal data" msgstr "" -#: surveybox/web/templates/form_designer.html:104 +#: surveybox/web/templates/form_designer.html:105 msgid "Images" msgstr "" -#: surveybox/web/templates/form_designer.html:104 +#: surveybox/web/templates/form_designer.html:105 msgid "Video" msgstr "" -#: surveybox/web/templates/form_designer.html:105 +#: surveybox/web/templates/form_designer.html:106 #: surveybox/web/templates/question_edit.html:165 #: surveybox/web/templates/question_edit.html:171 msgid "Image tiles" msgstr "" -#: surveybox/web/templates/form_designer.html:106 +#: surveybox/web/templates/form_designer.html:107 #, python-format msgid "controls %(num)d condition" msgid_plural "controls %(num)d conditions" msgstr[0] "" msgstr[1] "" -#: surveybox/web/templates/form_designer.html:113 +#: surveybox/web/templates/form_designer.html:114 #, python-format msgid "%(num)d question" msgid_plural "%(num)d questions" msgstr[0] "" msgstr[1] "" -#: surveybox/web/templates/form_designer.html:114 +#: surveybox/web/templates/form_designer.html:115 #, python-format msgid "at least %(n)s required" msgstr "" -#: surveybox/web/templates/form_designer.html:115 +#: surveybox/web/templates/form_designer.html:116 #, python-format msgid "at most %(n)s selectable" msgstr "" -#: surveybox/web/templates/form_designer.html:116 +#: surveybox/web/templates/form_designer.html:117 msgid "No questions yet: add questions of this type directly below the group." msgstr "" -#: surveybox/web/templates/form_designer.html:124 +#: surveybox/web/templates/form_designer.html:125 #: surveybox/web/templates/question_edit.html:226 msgid "Applies to the whole page." msgstr "" -#: surveybox/web/templates/form_designer.html:124 +#: surveybox/web/templates/form_designer.html:125 #: surveybox/web/templates/question_edit.html:227 msgid "Applies to the whole section up to the next heading or page." msgstr "" -#: surveybox/web/templates/form_designer.html:124 +#: surveybox/web/templates/form_designer.html:125 #: surveybox/web/templates/question_edit.html:228 msgid "Applies to all questions of the group." msgstr "" -#: surveybox/web/templates/form_designer.html:129 +#: surveybox/web/templates/form_designer.html:130 msgid "Edit" msgstr "" -#: surveybox/web/templates/form_designer.html:131 +#: surveybox/web/templates/form_designer.html:132 msgid "Add question to group" msgstr "" -#: surveybox/web/templates/form_designer.html:136 +#: surveybox/web/templates/form_designer.html:137 #: surveybox/web/templates/question_edit.html:299 msgid "Move up" msgstr "" -#: surveybox/web/templates/form_designer.html:142 +#: surveybox/web/templates/form_designer.html:143 #: surveybox/web/templates/question_edit.html:300 msgid "Move down" msgstr "" -#: surveybox/web/templates/form_designer.html:150 +#: surveybox/web/templates/form_designer.html:151 msgid "Question type" msgstr "" -#: surveybox/web/templates/form_designer.html:154 +#: surveybox/web/templates/form_designer.html:155 msgid "Add question" msgstr "" -#: surveybox/web/templates/form_designer.html:156 +#: surveybox/web/templates/form_designer.html:157 msgid "" "Questions that should appear only in certain cases (e.g. “How many " "people?” only after “Yes”): add the question, open it with “Edit” and set" @@ -4880,6 +4953,156 @@ msgstr "" msgid "Restore selected" msgstr "" +#: surveybox/web/templates/form_invitations.html:11 +#: surveybox/web/templates/question_edit.html:126 +#: surveybox/web/templates/question_edit.html:135 +msgid "Dates" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:13 +msgid "as soon as the form is open" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:16 +msgid "Access list" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:16 +msgid "People and groups of the access list are invited by email." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:16 +msgid "People and groups of the access list are only reminded, not invited." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:18 +msgid "Change dates" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:19 +msgid "Invitations go out once the form is published and open." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:23 +#: surveybox/web/templates/form_settings.html:59 +msgid "Invite by email address" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:27 +#, python-format +msgid "%(num)d guest invited." +msgid_plural "%(num)d guests invited." +msgstr[0] "" +msgstr[1] "" + +#: surveybox/web/templates/form_invitations.html:28 +#, python-format +msgid "%(num)d person with an account invited." +msgid_plural "%(num)d people with an account invited." +msgstr[0] "" +msgstr[1] "" + +#: surveybox/web/templates/form_invitations.html:29 +#, python-format +msgid "%(num)d address was already invited." +msgid_plural "%(num)d addresses were already invited." +msgstr[0] "" +msgstr[1] "" + +#: surveybox/web/templates/form_invitations.html:30 +#, python-format +msgid "Not invited, account deactivated: %(list)s" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:31 +#, python-format +msgid "Not valid, left in the field below: %(list)s" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:36 +msgid "Email addresses" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:38 +msgid "" +"Separated by commas, semicolons or line breaks; copied lists like “Erika " +"Mustermann ” work too. Addresses of existing accounts " +"are added to the access list and invited with the normal link (with sign-" +"in). All others are invited as guests: each gets a personal invitation " +"link that opens the form without an account and leads back to their own " +"answer later." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:39 +msgid "Invite" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:45 +msgid "" +"This form is anonymous: who has taken part is not shown here. Reminders " +"still go only to people who have not taken part." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:50 +msgid "Guests" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:54 +#: surveybox/web/templates/form_invitations.html:83 +msgid "Invited" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:54 +#: surveybox/web/templates/form_invitations.html:83 +msgid "Reminded" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:58 +msgid "no more emails" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:59 +msgid "planned" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:61 +#: surveybox/web/templates/form_invitations.html:90 +msgid "yes" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:61 +#: surveybox/web/templates/form_invitations.html:90 +msgid "not yet" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:64 +msgid "Withdraw" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:72 +msgid "" +"Withdrawing an invitation makes its link invalid; an answer already given" +" stays." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:74 +msgid "No guests invited yet." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:79 +msgid "People with an account" +msgstr "" + +#: surveybox/web/templates/form_invitations.html:97 +msgid "" +"Accounts appear here once they are invited: added above, or from the " +"access list when invitations go out." +msgstr "" + +#: surveybox/web/templates/form_invitations.html:99 +msgid "Edit access list" +msgstr "" + #: surveybox/web/templates/form_preview.html:10 msgid "Phone" msgstr "" @@ -5152,47 +5375,74 @@ msgid "Only needed for “link and password”." msgstr "" #: surveybox/web/templates/form_settings.html:45 -msgid "For “selected users and groups” you choose them on the next page." +msgid "" +"For “only invited people” you choose users and groups on the next page; " +"guests are invited by email under “Invitations”. Personal invitation " +"links open the form with every kind of access." msgstr "" #: surveybox/web/templates/form_settings.html:49 -msgid "Participation" +msgid "Invitations and reminders" msgstr "" #: surveybox/web/templates/form_settings.html:51 -msgid "Anonymous: answers are stored without reference to the person" +msgid "" +"Guests and accounts you add under “Invitations” are always invited by " +"email." +msgstr "" + +#: surveybox/web/templates/form_settings.html:52 +msgid "Send invitations (empty: as soon as the form is open)" +msgstr "" + +#: surveybox/web/templates/form_settings.html:54 +msgid "First reminder (empty: none)" msgstr "" #: surveybox/web/templates/form_settings.html:56 +msgid "Last reminder (empty: none)" +msgstr "" + +#: surveybox/web/templates/form_settings.html:58 +msgid "" +"The dates lie between the start and the end of participation, if those " +"are set; reminders come after the invitation. Reminded are invited people" +" who have not taken part yet and were invited before the reminder. People" +" with an account can switch these emails off in their account, guests " +"with a link in every email." +msgstr "" + +#: surveybox/web/templates/form_settings.html:63 +msgid "Participation" +msgstr "" + +#: surveybox/web/templates/form_settings.html:65 +msgid "Anonymous: answers are stored without reference to the person" +msgstr "" + +#: surveybox/web/templates/form_settings.html:70 msgid "Yes, until the form closes" msgstr "" -#: surveybox/web/templates/form_settings.html:59 +#: surveybox/web/templates/form_settings.html:73 msgid "" "For signed-in participants and for guests with their personal link; not " "for anonymous forms." msgstr "" -#: surveybox/web/templates/form_settings.html:62 -msgid "" -"Only for access “Selected users and groups” and with an end date. Each " -"person gets the reminder once, by email; they can switch reminders off in" -" their account." -msgstr "" - -#: surveybox/web/templates/form_settings.html:65 +#: surveybox/web/templates/form_settings.html:76 msgid "Never" msgstr "" -#: surveybox/web/templates/form_settings.html:66 +#: surveybox/web/templates/form_settings.html:77 msgid "After their own participation" msgstr "" -#: surveybox/web/templates/form_settings.html:67 +#: surveybox/web/templates/form_settings.html:78 msgid "After the form closes" msgstr "" -#: surveybox/web/templates/form_settings.html:69 +#: surveybox/web/templates/form_settings.html:80 msgid "" "Participants see counts, bars, averages, polls and the occupancy of " "entries – never free-text answers, files or questions marked as personal." @@ -5202,19 +5452,19 @@ msgid "" "individuals answered." msgstr "" -#: surveybox/web/templates/form_settings.html:73 +#: surveybox/web/templates/form_settings.html:84 msgid "Places, calendar and comments" msgstr "" -#: surveybox/web/templates/form_settings.html:80 +#: surveybox/web/templates/form_settings.html:91 msgid "Yes, first name and initial of the last name" msgstr "" -#: surveybox/web/templates/form_settings.html:81 +#: surveybox/web/templates/form_settings.html:92 msgid "Yes, first and last name" msgstr "" -#: surveybox/web/templates/form_settings.html:83 +#: surveybox/web/templates/form_settings.html:94 msgid "" "For shift plans and sign-up lists: participants see at each entry who has" " already signed up. The name comes from the question “Participant name”, " @@ -5222,102 +5472,102 @@ msgid "" "tells participants about it. Not for anonymous forms." msgstr "" -#: surveybox/web/templates/form_settings.html:87 -#: surveybox/web/templates/form_settings.html:100 +#: surveybox/web/templates/form_settings.html:98 +#: surveybox/web/templates/form_settings.html:111 msgid "Off" msgstr "" -#: surveybox/web/templates/form_settings.html:88 +#: surveybox/web/templates/form_settings.html:99 msgid "Calendar file (ICS) to download for participants" msgstr "" -#: surveybox/web/templates/form_settings.html:89 +#: surveybox/web/templates/form_settings.html:100 msgid "Calendar file and subscription link" msgstr "" -#: surveybox/web/templates/form_settings.html:92 +#: surveybox/web/templates/form_settings.html:103 msgid "Download for participants:" msgstr "" -#: surveybox/web/templates/form_settings.html:95 +#: surveybox/web/templates/form_settings.html:106 msgid "" "Subscription link (works without sign-in; whoever knows it sees the " "confirmed dates):" msgstr "" -#: surveybox/web/templates/form_settings.html:101 +#: surveybox/web/templates/form_settings.html:112 msgid "Moderated: new comments are visible after approval" msgstr "" -#: surveybox/web/templates/form_settings.html:102 +#: surveybox/web/templates/form_settings.html:113 msgid "Public: new comments are visible at once" msgstr "" -#: surveybox/web/templates/form_settings.html:109 +#: surveybox/web/templates/form_settings.html:120 msgid "" "Replies to messages about this form go to this address. Empty: the " "address from the email settings." msgstr "" -#: surveybox/web/templates/form_settings.html:113 +#: surveybox/web/templates/form_settings.html:124 msgid "Data protection" msgstr "" -#: surveybox/web/templates/form_settings.html:121 +#: surveybox/web/templates/form_settings.html:132 #, python-format msgid "" "Empty: default of this installation (%(n)s days). The period starts at " "the end date or when the form is closed." msgstr "" -#: surveybox/web/templates/form_settings.html:122 +#: surveybox/web/templates/form_settings.html:133 #, python-format msgid "The answers will be deleted on %(date)s." msgstr "" -#: surveybox/web/templates/form_settings.html:122 +#: surveybox/web/templates/form_settings.html:133 #, python-format msgid "The answers will be anonymized on %(date)s." msgstr "" -#: surveybox/web/templates/form_settings.html:125 +#: surveybox/web/templates/form_settings.html:136 msgid "Keep the answer anonymized" msgstr "" -#: surveybox/web/templates/form_settings.html:126 +#: surveybox/web/templates/form_settings.html:137 msgid "Delete the answer completely" msgstr "" -#: surveybox/web/templates/form_settings.html:130 +#: surveybox/web/templates/form_settings.html:141 #: surveybox/web/templates/question_edit.html:59 msgid "Do not ask" msgstr "" -#: surveybox/web/templates/form_settings.html:131 +#: surveybox/web/templates/form_settings.html:142 msgid "Optional" msgstr "" -#: surveybox/web/templates/form_settings.html:132 +#: surveybox/web/templates/form_settings.html:143 msgid "Required" msgstr "" -#: surveybox/web/templates/form_settings.html:133 +#: surveybox/web/templates/form_settings.html:144 msgid "Use the answer to the question “Email address”" msgstr "" -#: surveybox/web/templates/form_settings.html:137 +#: surveybox/web/templates/form_settings.html:148 msgid "" "The form has no question of type “Email address” yet. Add one, otherwise " "guests get no email." msgstr "" -#: surveybox/web/templates/form_settings.html:139 +#: surveybox/web/templates/form_settings.html:150 msgid "" "The form asks for an email address. To send guests their personal link to" " it, choose “Use the answer to the question “Email address””." msgstr "" -#: surveybox/web/templates/form_settings.html:141 +#: surveybox/web/templates/form_settings.html:152 msgid "" "Guests (participants without an account) always get a personal link to " "view, change or delete their answer. With an email address they also get " @@ -5327,26 +5577,26 @@ msgid "" "anonymous forms." msgstr "" -#: surveybox/web/templates/form_settings.html:149 +#: surveybox/web/templates/form_settings.html:160 msgid "Renew subscription link" msgstr "" -#: surveybox/web/templates/form_settings.html:150 +#: surveybox/web/templates/form_settings.html:161 msgid "" "The old link stops working. Calendars that subscribed to it must " "subscribe again." msgstr "" -#: surveybox/web/templates/form_settings.html:153 +#: surveybox/web/templates/form_settings.html:164 msgid "Renew link" msgstr "" -#: surveybox/web/templates/form_settings.html:159 -#: surveybox/web/templates/form_settings.html:165 +#: surveybox/web/templates/form_settings.html:170 +#: surveybox/web/templates/form_settings.html:176 msgid "Delete form" msgstr "" -#: surveybox/web/templates/form_settings.html:163 +#: surveybox/web/templates/form_settings.html:174 #, python-format msgid "" "The form goes to the trash in the form list. There you can restore it for" @@ -5357,7 +5607,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: surveybox/web/templates/form_settings.html:164 +#: surveybox/web/templates/form_settings.html:175 msgid "Yes, delete this form with all questions and answers." msgstr "" @@ -5649,6 +5899,45 @@ msgstr "" msgid "not reachable or not up to date" msgstr "" +#: surveybox/web/templates/invitation.html:8 +msgid "" +"This invitation link is not valid (any more). Please ask the person who " +"invited you." +msgstr "" + +#: surveybox/web/templates/invitation.html:10 +#, python-format +msgid "" +"Your invitation to “%(title)s” and your address in it have been deleted. " +"You will not receive any further emails about it." +msgstr "" + +#: surveybox/web/templates/invitation.html:12 +#, python-format +msgid "Invitation to “%(title)s”" +msgstr "" + +#: surveybox/web/templates/invitation.html:14 +msgid "" +"You will not receive any further emails about this invitation. Your " +"invitation link still works." +msgstr "" + +#: surveybox/web/templates/invitation.html:17 +msgid "No further emails about this invitation" +msgstr "" + +#: surveybox/web/templates/invitation.html:21 +msgid "" +"You can also delete the invitation with your address. The organisers then" +" no longer see it, and the invitation link stops working; an answer you " +"already gave stays." +msgstr "" + +#: surveybox/web/templates/invitation.html:22 +msgid "Delete invitation and address" +msgstr "" + #: surveybox/web/templates/login.html:19 #: surveybox/web/templates/login_mfa.html:16 msgid "or" @@ -5985,11 +6274,6 @@ msgstr "" msgid "Texts" msgstr "" -#: surveybox/web/templates/question_edit.html:126 -#: surveybox/web/templates/question_edit.html:135 -msgid "Dates" -msgstr "" - #: surveybox/web/templates/question_edit.html:128 msgid "Answers per option" msgstr "" @@ -6707,6 +6991,40 @@ msgid "" "deleted after 7 days." msgstr "" +#: surveybox/web/templates/mail/invitation.txt:1 +#, python-format +msgid "Invitation: %(title)s" +msgstr "" + +#: surveybox/web/templates/mail/invitation.txt:4 +#, python-format +msgid "You are invited to take part in “%(title)s”." +msgstr "" + +#: surveybox/web/templates/mail/invitation.txt:4 +#, python-format +msgid "The form is open until %(date)s." +msgstr "" + +#: surveybox/web/templates/mail/invitation.txt:7 +msgid "Your personal link (no account needed):" +msgstr "" + +#: surveybox/web/templates/mail/invitation.txt:10 +msgid "" +"The link is meant for you only: with it you can also view and, if the " +"form allows it, change your answer later." +msgstr "" + +#: surveybox/web/templates/mail/invitation.txt:12 +#: surveybox/web/templates/mail/reminder.txt:9 +msgid "If you do not want any further emails about this invitation:" +msgstr "" + +#: surveybox/web/templates/mail/invitation.txt:15 +msgid "Please sign in to take part:" +msgstr "" + #: surveybox/web/templates/mail/invite.txt:1 #, python-format msgid "Your access to %(app)s" @@ -6809,6 +7127,11 @@ msgid "" "form is open until %(date)s." msgstr "" +#: surveybox/web/templates/mail/reminder.txt:4 +#, python-format +msgid "You have been invited to “%(title)s” and have not taken part yet." +msgstr "" + #: surveybox/web/templates/mail/retention_notice.txt:1 #, python-format msgid "Retention period ends soon: %(title)s" diff --git a/surveybox/mail/custom.py b/surveybox/mail/custom.py index 4d3248d..6399907 100644 --- a/surveybox/mail/custom.py +++ b/surveybox/mail/custom.py @@ -47,7 +47,8 @@ KINDS: dict[str, str] = { "promoted": N_("Moved up from the waiting list"), "confirmed": N_("Date confirmed in a poll"), "changed": N_("Chosen entry or date removed"), - "reminder": N_("Reminder before the end date"), + "invitation": N_("Invitation to a form"), + "reminder": N_("Reminder to invited people"), "comment_published": N_("Comment published"), "comment_new": N_("New comment (managers)"), "slot_full": N_("Entry booked up (owner)"), @@ -69,6 +70,7 @@ SCALARS: dict[str, str] = { "forgot_url": N_("page “Forgot password”"), "login_url": N_("sign-in page"), "settings_link": N_("settings of the form"), + "stop_link": N_("link to stop emails about an invitation (guests only)"), } # Links, ohne die eine Mail ihren Zweck verfehlt REQUIRED = ("link", "forgot_url", "login_url", "settings_link") diff --git a/surveybox/mail/notify.py b/surveybox/mail/notify.py index 9a7e4f2..ef0bd23 100644 --- a/surveybox/mail/notify.py +++ b/surveybox/mail/notify.py @@ -79,8 +79,8 @@ EVENTS: dict[str, Event] = { "participant"), "changed": Event(N_("An entry or date I chose has been removed from a form"), "participant"), - "reminder": Event(N_("Reminder before the end date of a form I was invited to"), - "participant"), + "invitation": Event(N_("Invitation to a form"), "participant"), + "reminder": Event(N_("Reminder about a form I was invited to"), "participant"), "comment_new": Event(N_("New comments on forms I manage"), "manager"), "slot_full": Event(N_("An entry in a form I own is booked up"), "manager"), "deadline": Event(N_("A form I own has reached its end date"), "manager"), @@ -266,16 +266,20 @@ def send( event: str | None = None, form: Form | None = None, dedupe_key: str | None = None, + unsubscribe_url: str | None = None, ) -> bool: - """Mail eintragen. Mit `event`: nur, wenn gewünscht, bestätigt und nicht abbestellt.""" + """Mail eintragen. Mit `event`: nur, wenn gewünscht, bestätigt und nicht abbestellt. + `unsubscribe_url`: eigener Abmeldelink (Einladungen an Gäste ohne Adresse im System).""" recipient = to if isinstance(to, Recipient) else for_user(to, settings) if event is not None and not allowed(db, recipient, event, form): return False secret = settings.secret_key.get_secret_value() origin = settings.public_origin headers: dict[str, str] = {} - unsubscribe_url = None - if event is not None: + if unsubscribe_url is not None: + headers["List-Unsubscribe"] = f"<{unsubscribe_url}>" + headers["List-Unsubscribe-Post"] = "List-Unsubscribe=One-Click" + elif event is not None: token = unsubscribe_token(secret, recipient, event, form) unsubscribe_url = f"{origin}/mail/unsubscribe/{token}" headers["List-Unsubscribe"] = f"<{unsubscribe_url}>" diff --git a/surveybox/migrations/versions/0019_invitations.py b/surveybox/migrations/versions/0019_invitations.py new file mode 100644 index 0000000..b9ae42d --- /dev/null +++ b/surveybox/migrations/versions/0019_invitations.py @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +"""Einladungen per E-Mail (Gäste mit persönlichem Link, Konten der Zugriffsliste), +Termine für Einladung und zwei Erinnerungen statt "Tage vor dem Ende". + +Revision: 0019_invitations +Vorgänger: 0018_form_history + +Bisherige "Erinnerung … Tage vor dem Ende" wird zur letzten Erinnerung, sofern +dieser Zeitpunkt noch bevorsteht; liegt er schon zurück, war die Erinnerung +bereits fällig und wird nicht noch einmal verschickt. +""" + +from collections.abc import Sequence + +import sqlalchemy as sa +from alembic import op +from sqlalchemy.dialects import postgresql + +revision: str = "0019_invitations" +down_revision: str | None = "0018_form_history" +branch_labels: str | Sequence[str] | None = None +depends_on: str | Sequence[str] | None = None + +TS = sa.DateTime(timezone=True) + + +def upgrade() -> None: + op.add_column("form", sa.Column("invite_at", TS, nullable=True)) + op.add_column("form", sa.Column("remind_first_at", TS, nullable=True)) + op.add_column("form", sa.Column("remind_last_at", TS, nullable=True)) + op.add_column("form", sa.Column("invite_accounts", sa.Boolean(), + server_default=sa.text("false"), nullable=False)) + op.execute( + "UPDATE form SET remind_last_at = closes_at - make_interval(days => reminder_days) " + "WHERE reminder_days IS NOT NULL AND closes_at IS NOT NULL " + "AND closes_at - make_interval(days => reminder_days) > now()" + ) + op.drop_column("form", "reminder_days") + + op.create_table( + "form_invitation", + sa.Column("id", sa.BigInteger(), autoincrement=True, nullable=False), + sa.Column("public_id", postgresql.UUID(as_uuid=True), + server_default=sa.text("gen_random_uuid()"), nullable=False), + sa.Column("form_id", sa.BigInteger(), nullable=False), + sa.Column("user_id", sa.BigInteger(), nullable=True), + sa.Column("email", sa.Text(), nullable=True), + sa.Column("created_by", sa.BigInteger(), nullable=True), + sa.Column("created_at", TS, server_default=sa.text("now()"), nullable=False), + sa.Column("sent_at", TS, nullable=True), + sa.Column("reminded_first_at", TS, nullable=True), + sa.Column("reminded_last_at", TS, nullable=True), + sa.Column("participated_at", TS, nullable=True), + sa.Column("response_id", sa.BigInteger(), nullable=True), + sa.Column("unsubscribed_at", TS, nullable=True), + sa.CheckConstraint("(user_id IS NULL) <> (email IS NULL)", + name=op.f("ck_form_invitation_exactly_one_target")), + sa.ForeignKeyConstraint(["form_id"], ["form.id"], + name=op.f("fk_form_invitation_form_id_form"), ondelete="CASCADE"), + sa.ForeignKeyConstraint(["user_id"], ["user_account.id"], + name=op.f("fk_form_invitation_user_id_user_account"), + ondelete="CASCADE"), + sa.ForeignKeyConstraint(["created_by"], ["user_account.id"], + name=op.f("fk_form_invitation_created_by_user_account"), + ondelete="SET NULL"), + sa.ForeignKeyConstraint(["response_id"], ["response.id"], + name=op.f("fk_form_invitation_response_id_response"), + ondelete="SET NULL"), + sa.PrimaryKeyConstraint("id", name=op.f("pk_form_invitation")), + sa.UniqueConstraint("public_id", name=op.f("uq_form_invitation_public_id")), + sa.UniqueConstraint("form_id", "user_id", name="uq_form_invitation_user"), + sa.UniqueConstraint("form_id", "email", name="uq_form_invitation_email"), + ) + for col in ("form_id", "user_id", "response_id"): + op.create_index(op.f(f"ix_form_invitation_{col}"), "form_invitation", [col]) + + +def downgrade() -> None: + for col in ("response_id", "user_id", "form_id"): + op.drop_index(op.f(f"ix_form_invitation_{col}"), table_name="form_invitation") + op.drop_table("form_invitation") + op.add_column("form", sa.Column("reminder_days", sa.Integer(), nullable=True)) + op.drop_column("form", "invite_accounts") + op.drop_column("form", "remind_last_at") + op.drop_column("form", "remind_first_at") + op.drop_column("form", "invite_at") diff --git a/surveybox/models/__init__.py b/surveybox/models/__init__.py index 58f9e5c..b00d324 100644 --- a/surveybox/models/__init__.py +++ b/surveybox/models/__init__.py @@ -35,6 +35,7 @@ from surveybox.models.forms import ( Form, FormAccess, FormAccessEntry, + FormInvitation, FormMember, FormParticipation, FormStatus, @@ -68,6 +69,7 @@ __all__ = [ "Form", "FormAccess", "FormAccessEntry", + "FormInvitation", "FormMember", "FormMute", "FormParticipation", diff --git a/surveybox/models/forms.py b/surveybox/models/forms.py index 8184367..dd7e5ee 100644 --- a/surveybox/models/forms.py +++ b/surveybox/models/forms.py @@ -122,8 +122,15 @@ class Form(Base): slot_names: Mapped[str] = mapped_column(Text, nullable=False, server_default=text("'off'")) # Höchstzahl gebuchter Plätze je Person über alle Teilnahme-Felder (leer: keine) slots_max_per_person: Mapped[int | None] = mapped_column(Integer) - # Erinnerung an Eingeladene ohne Teilnahme: so viele Tage vor dem Enddatum - reminder_days: Mapped[int | None] = mapped_column(Integer) + # Einladungen (siehe forms.invitations): Versand (leer: sobald das Formular offen ist), + # erste und letzte Erinnerung an Eingeladene ohne Teilnahme (leer: keine) + invite_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + remind_first_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + remind_last_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + # Personen und Gruppen der Zugriffsliste per Mail einladen + invite_accounts: Mapped[bool] = mapped_column( + Boolean, nullable=False, server_default=text("false") + ) # Bestätigte Termine: aus, als Datei oder zusätzlich als Abo-Link calendar_mode: Mapped[str] = mapped_column( Text, nullable=False, server_default=text("'off'") @@ -458,3 +465,44 @@ class ResponseNote(Base): created_at: Mapped[datetime] = mapped_column( DateTime(timezone=True), nullable=False, server_default=func.now() ) + + +class FormInvitation(Base): + """Einladung zu einem Formular: ein Konto (aus der Zugriffsliste) oder eine + E-Mail-Adresse (Gast mit persönlichem Einladungslink). Hält fest, wann + eingeladen und erinnert wurde und ob die Person teilgenommen hat.""" + + __tablename__ = "form_invitation" + __table_args__ = ( + CheckConstraint("(user_id IS NULL) <> (email IS NULL)", name="exactly_one_target"), + UniqueConstraint("form_id", "user_id", name="uq_form_invitation_user"), + UniqueConstraint("form_id", "email", name="uq_form_invitation_email"), + ) + + id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True) + public_id: Mapped[uuid.UUID] = mapped_column( + UUID(as_uuid=True), unique=True, nullable=False, server_default=func.gen_random_uuid() + ) + form_id: Mapped[int] = mapped_column( + BigInteger, ForeignKey("form.id", ondelete="CASCADE"), nullable=False, index=True + ) + user_id: Mapped[int | None] = mapped_column( + BigInteger, ForeignKey("user_account.id", ondelete="CASCADE"), index=True + ) + email: Mapped[str | None] = mapped_column(Text) + created_by: Mapped[int | None] = mapped_column( + BigInteger, ForeignKey("user_account.id", ondelete="SET NULL") + ) + created_at: Mapped[datetime] = mapped_column( + DateTime(timezone=True), nullable=False, server_default=func.now() + ) + sent_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + reminded_first_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + reminded_last_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + # Gäste: Teilnahme über den Einladungslink (bei anonymen Formularen ohne Antwort) + participated_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) + response_id: Mapped[int | None] = mapped_column( + BigInteger, ForeignKey("response.id", ondelete="SET NULL"), index=True + ) + # Gast will keine Mails mehr zu dieser Einladung + unsubscribed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) diff --git a/surveybox/web/app.py b/surveybox/web/app.py index 815f108..4d5be4e 100644 --- a/surveybox/web/app.py +++ b/surveybox/web/app.py @@ -34,12 +34,14 @@ from surveybox.web.routes import ( form_comments, form_followups, form_history, + form_invitations, form_media, form_results, form_team, forms, groups, health, + invitation, pages, passkeys, personal, @@ -158,6 +160,7 @@ def create_app() -> FastAPI: app.include_router(admin_mail.router, dependencies=protected) app.include_router(groups.router, dependencies=protected) app.include_router(form_history.router, dependencies=protected) + app.include_router(form_invitations.router, dependencies=protected) app.include_router(forms.router, dependencies=protected) app.include_router(form_results.router, dependencies=protected) app.include_router(form_team.router, dependencies=protected) @@ -165,10 +168,12 @@ def create_app() -> FastAPI: app.include_router(form_followups.router, dependencies=protected) app.include_router(form_media.router, dependencies=protected) app.include_router(fill.router, dependencies=protected) + app.include_router(invitation.router, dependencies=protected) app.include_router(personal.router, dependencies=protected) app.include_router(personal.guest_router, dependencies=protected) app.include_router(register.router, dependencies=protected) app.include_router(fill.calendar_router) # Abmeldelinks: der Schlüssel im Link berechtigt; RFC 8058 sendet ohne Cookies app.include_router(unsubscribe.router) + app.include_router(invitation.stop_router) return app diff --git a/surveybox/web/routes/admin.py b/surveybox/web/routes/admin.py index 5661985..77b81f5 100644 --- a/surveybox/web/routes/admin.py +++ b/surveybox/web/routes/admin.py @@ -95,6 +95,8 @@ ACTION_NAMES: dict[str, str] = { "form.trash_restored": N_("Deleted form restored"), "admin.history_changed": N_("Form history settings changed"), "admin.user_unlocked": N_("Lock of an account lifted"), + "form.invitations_added": N_("People invited to a form by email"), + "form.invitation_removed": N_("Invitation withdrawn"), "account.deleted": N_("Account deleted"), "account.exported": N_("Own data downloaded"), "admin.user_exported": N_("Data of a user exported"), diff --git a/surveybox/web/routes/admin_mail_templates.py b/surveybox/web/routes/admin_mail_templates.py index ca2658e..ea62dfd 100644 --- a/surveybox/web/routes/admin_mail_templates.py +++ b/surveybox/web/routes/admin_mail_templates.py @@ -36,6 +36,7 @@ def sample_context(settings: AppSettings) -> dict[str, Any]: "edited": False, "pending": False, "mode": "anonymize", "calendar": "", "options": [], "items": [], "links": [], "documents": [], "question": SimpleNamespace(label=i18n.gettext("Shift")), + "invited_guest": False, "stop_link": f"{origin}/mail/invitation/beispiel", } diff --git a/surveybox/web/routes/fill.py b/surveybox/web/routes/fill.py index 93f39c4..fa21c96 100644 --- a/surveybox/web/routes/fill.py +++ b/surveybox/web/routes/fill.py @@ -17,6 +17,7 @@ from surveybox.forms import ( comments, followups, guests, + invitations, public_results, service, team, @@ -28,7 +29,7 @@ from surveybox.mail import notify from surveybox.media import config as media_config from surveybox.media import service as media_service from surveybox.models import Form as FormModel -from surveybox.models import MediaKind +from surveybox.models import FormInvitation, MediaKind from surveybox.security.client_ip import ip_key from surveybox.security.tokens import new_token from surveybox.web.deps import ( @@ -75,6 +76,20 @@ def _password_ok(request: Request, settings: AppSettings, form: FormModel) -> bo ) +def _invitation(request: Request, db: Db, settings: AppSettings, + form: FormModel) -> FormInvitation | None: + """Einladung aus dem Cookie, das der persönliche Einladungslink setzt.""" + return invitations.from_cookie(db, settings.secret_key.get_secret_value(), form, + request.cookies.get(invitations.cookie_name(form))) + + +def _access(request: Request, db: Db, settings: AppSettings, form: FormModel, + user: Any) -> FillAccess: + return service.fill_access_for( + db, form, user, _password_ok(request, settings, form), + _invitation(request, db, settings, form) is not None) + + def _gate( request: Request, db: Db, settings: AppSettings, form: FormModel, auth: OptionalUser ) -> Response | None: @@ -84,12 +99,11 @@ def _gate( if state == FillState.DRAFT: raise NotFound() if state != FillState.OPEN: - allowed = service.fill_access( - db, form, user, _password_ok(request, settings, form)) == FillAccess.OK + allowed = _access(request, db, settings, form, user) == FillAccess.OK results_url = _results_url(request, db, settings, form, user) if allowed else None return render(request, "fill_closed.html", {"form": form, "state": state, "results_url": results_url}) - access = service.fill_access(db, form, user, _password_ok(request, settings, form)) + access = _access(request, db, settings, form, user) if access == FillAccess.LOGIN: raise RedirectTo(login_url(request)) if access == FillAccess.FORBIDDEN: @@ -236,6 +250,16 @@ def fill_form( return blocked user = auth.user if auth else None secret = settings.secret_key.get_secret_value() + invitation = _invitation(request, db, settings, form) if user is None else None + if invitation is not None and invitations.participated(invitation) and ( + not form.allow_multiple): + return render( + request, "fill_done.html", + {"form": form, "already": True, "can_edit": False, "documents": [], + "invited_link": invitation.response_id is not None, + **_extras(request, db, settings, form, user), + **_comment_context(request, db, settings, form, "thanks")}, + ) if user is not None and not form.allow_multiple and service.has_participated( db, secret, form, user ): @@ -248,6 +272,10 @@ def fill_form( **_extras(request, db, settings, form, user), **_comment_context(request, db, settings, form, "thanks")}, ) + if invitation is not None and guests.can_collect(form): + # Die Adresse der Einladung ist bekannt; die Person kann sie ändern + return _fill_page(request, db, settings, form, + values={"guest_email": [invitation.email or ""]}) return _fill_page(request, db, settings, form) @@ -265,13 +293,20 @@ def submit_form( blocked = _gate(request, db, settings, form, auth) if blocked is not None: return blocked + user = auth.user if auth else None + invitation = _invitation(request, db, settings, form) if user is None else None + if invitation is not None and invitations.participated(invitation) and ( + not form.allow_multiple): + return RedirectResponse(f"/f/{form.share_token}", status_code=303) collected = _collect(request, db, settings, form, fields, files) validation = service.validate( form, fields, settings.tz, check_consent=True, files=collected.files, file_errors=collected.errors, ) - user = auth.user if auth else None - guest = guests.parse_email(form, user, (fields.get("guest_email") or [""])[0]) + raw_email = (fields.get("guest_email") or [""])[0] + if invitation is not None and not raw_email.strip() and guests.can_collect(form): + raw_email = invitation.email or "" + guest = guests.parse_email(form, user, raw_email) if not validation.ok or guest.error: db.commit() # vorläufige Dateien behalten, damit niemand neu hochladen muss return _fill_page( @@ -289,6 +324,8 @@ def submit_form( guest_address = guest.email or guests.email_from_answers( form, validation.stored, validation.hidden ) + if invitation is not None and not guest_address and not form.anonymous: + guest_address = invitation.email # Eingangsbestätigung an die eingeladene Adresse planned = user is None and followups.planned(db, form) acknowledged = (fields.get("followup_ack") or [""])[0] == "1" if planned and not guest_address and not acknowledged and guests.can_collect(form): @@ -324,6 +361,8 @@ def submit_form( files=collected.files, status_code=409, ) uploads.link(db, form, response, _visible_files(collected, validation)) + if invitation is not None: + invitations.mark_participated(form, invitation, response) link_token = guests.issue_link(response) if guests.wants_link(form, user) else None mail_notice = "none" if planned and not guest_address and guests.can_collect(form) else None if link_token is not None and guest_address: @@ -404,7 +443,7 @@ def results( if service.fill_state(form) == FillState.DRAFT or not public_results.offered(form): raise NotFound() user = auth.user if auth else None - access = service.fill_access(db, form, user, _password_ok(request, settings, form)) + access = _access(request, db, settings, form, user) if access == FillAccess.LOGIN: raise RedirectTo(login_url(request)) if access == FillAccess.FORBIDDEN: @@ -619,7 +658,7 @@ def _media_for_participant( if service.fill_state(form) != FillState.OPEN: raise NotFound() user = auth.user if auth else None - access = service.fill_access(db, form, user, _password_ok(request, settings, form)) + access = _access(request, db, settings, form, user) if access != FillAccess.OK: raise NotFound() found = media_service.find(db, form, media_id) @@ -654,7 +693,7 @@ def places( if service.fill_state(form) != FillState.OPEN: raise NotFound() user = auth.user if auth else None - if service.fill_access(db, form, user, _password_ok(request, settings, form)) != FillAccess.OK: + if _access(request, db, settings, form, user) != FillAccess.OK: raise NotFound() data = { str(qid): {oid: {"free": a.free, "full": a.full} for oid, a in options.items()} @@ -673,7 +712,7 @@ def calendar_file( if form.calendar_mode == "off" or service.fill_state(form) == FillState.DRAFT: raise NotFound() user = auth.user if auth else None - if service.fill_access(db, form, user, _password_ok(request, settings, form)) != FillAccess.OK: + if _access(request, db, settings, form, user) != FillAccess.OK: raise NotFound() return calendar_response(settings, form, download=True) @@ -719,7 +758,7 @@ def _comment_gate( if form.comments_mode == "off" or service.fill_state(form) == FillState.DRAFT: raise NotFound() user = auth.user if auth else None - if service.fill_access(db, form, user, _password_ok(request, settings, form)) != FillAccess.OK: + if _access(request, db, settings, form, user) != FillAccess.OK: raise NotFound() return form diff --git a/surveybox/web/routes/form_history.py b/surveybox/web/routes/form_history.py index 3b8a325..53f87d5 100644 --- a/surveybox/web/routes/form_history.py +++ b/surveybox/web/routes/form_history.py @@ -51,10 +51,10 @@ SETTING_NAMES = { "slot_names": N_("Show who has signed up"), "slots_max_per_person": N_( "Places per person across all participation fields (empty: no limit)"), - "reminder_days": N_( - "Remind invited people who have not taken part yet … days before the end " - "(empty: no reminder)" - ), + "invite_at": N_("Send invitations"), + "remind_first_at": N_("First reminder"), + "remind_last_at": N_("Last reminder"), + "invite_accounts": N_("Invite the people and groups of the access list by email"), "calendar_mode": N_("Confirmed dates as calendar"), "comments_mode": N_("Comments"), "comments_anonymous": N_( @@ -66,7 +66,8 @@ SETTING_NAMES = { # Werte, die als Text gezeigt werden; bei den übrigen nur „geändert“ SHOWN_VALUES = {"title", "description", "opens_at", "closes_at", "allow_multiple", "retention_days", "privacy_notice", "require_consent", "consent_text", - "slots_max_per_person", "reminder_days", "comments_anonymous", "reply_to", + "slots_max_per_person", "invite_at", "remind_first_at", "remind_last_at", + "invite_accounts", "comments_anonymous", "reply_to", "comments_notify"} ERRORS = { diff --git a/surveybox/web/routes/form_invitations.py b/surveybox/web/routes/form_invitations.py new file mode 100644 index 0000000..3786ad4 --- /dev/null +++ b/surveybox/web/routes/form_invitations.py @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +"""Einladungen eines Formulars verwalten: Adressen einfügen, Stand ansehen. Siehe +forms.invitations.""" + +from __future__ import annotations + +from typing import Annotated, Any + +from fastapi import APIRouter, Form, Request +from fastapi.responses import RedirectResponse, Response + +from surveybox.accounts import audit +from surveybox.forms import invitations +from surveybox.i18n import N_ +from surveybox.models import Form as FormModel +from surveybox.web.deps import AppSettings, CurrentUser, Db, NotFound +from surveybox.web.form_deps import EditForm +from surveybox.web.templating import render + +router = APIRouter(prefix="/forms", include_in_schema=False) + +ERRORS = { + "addresses_missing": N_("Please paste at least one email address."), + "too_many_at_once": N_("At most 500 addresses at once."), + "too_many": N_("A form can have at most 5000 invitations."), +} + + +def _page(request: Request, db: Db, settings: AppSettings, form: FormModel, + **extra: Any) -> Response: + status_code = int(extra.pop("status_code", 200)) + rows = invitations.overview(db, settings.secret_key.get_secret_value(), form) + return render(request, "form_invitations.html", { + "form": form, + "guests": [r for r in rows if not r.account], + "accounts": [r for r in rows if r.account], + "anonymous": form.anonymous, + **extra, + }, status_code=status_code) + + +@router.get("/{public_id}/invitations") +def invitations_page(request: Request, db: Db, settings: AppSettings, + form: EditForm) -> Response: + if form.is_template: + raise NotFound() + return _page(request, db, settings, form) + + +@router.post("/{public_id}/invitations") +def add_invitations( + request: Request, db: Db, settings: AppSettings, auth: CurrentUser, form: EditForm, + addresses: Annotated[str, Form(max_length=100_000)] = "", +) -> Response: + if form.is_template: + raise NotFound() + try: + added = invitations.add(db, form, addresses, auth.user) + except invitations.InvitationError as exc: + db.rollback() + return _page(request, db, settings, form, error=ERRORS[exc.code], + addresses=addresses, status_code=400) + if added.total: + audit.record(db, "form.invitations_added", actor_id=auth.user.id, target_type="form", + target_id=form.id, + details={"guests": len(added.guests), "accounts": len(added.accounts)}) + db.commit() + return _page(request, db, settings, form, added=added, + addresses="\n".join(added.invalid)) + + +@router.post("/{public_id}/invitations/{invitation_id}/delete") +def remove_invitation(db: Db, auth: CurrentUser, form: EditForm, + invitation_id: str) -> Response: + if invitations.remove(db, form, invitation_id): + audit.record(db, "form.invitation_removed", actor_id=auth.user.id, target_type="form", + target_id=form.id) + db.commit() + return RedirectResponse(f"/forms/{form.public_id}/invitations", status_code=303) diff --git a/surveybox/web/routes/forms.py b/surveybox/web/routes/forms.py index 175d21b..c564f2e 100644 --- a/surveybox/web/routes/forms.py +++ b/surveybox/web/routes/forms.py @@ -86,7 +86,12 @@ FORM_ERRORS: dict[str, str] = { "slots_max_invalid": N_("The number of places per person must be between 1 and 1000."), "config_group_type_invalid": N_("Please choose which kind of questions the group holds."), "reply_to_invalid": N_("Please enter a valid reply-to address (without a name)."), - "reminder_days_invalid": N_("The reminder must be between 1 and 30 days before the end."), + "schedule_before_open": N_( + "Invitations and reminders cannot be before the start of participation."), + "schedule_after_close": N_( + "Invitations and reminders must be before the end of participation."), + "schedule_order": N_("The last reminder must come after the first reminder."), + "schedule_reminder_before_invite": N_("Reminders must come after the invitations."), "access_not_allowed": N_( "“All signed-in users” is reserved for instance-wide roles. Choose groups or a link." ), @@ -101,7 +106,8 @@ STATUS_NAMES: dict[str, str] = { ACCESS_NAMES: dict[str, str] = { FormAccess.USERS: N_("All signed-in users"), - FormAccess.RESTRICTED: N_("Selected users and groups"), + FormAccess.RESTRICTED: N_( + "Only invited people: selected users and groups, guests invited by email"), FormAccess.LINK: N_("Anyone with the link, also without an account"), FormAccess.LINK_PASSWORD: N_("Anyone with the link and the password"), } @@ -627,6 +633,10 @@ def move_question( # -------------------------------------------------------------------------- +def _local(value: Any, tz: Any) -> str: + return value.astimezone(tz).strftime("%Y-%m-%dT%H:%M") if value is not None else "" + + def _with_current_group( db: Db, choices: list[tuple[UserGroup, int]], form: FormModel ) -> list[tuple[UserGroup, int]]: @@ -661,6 +671,9 @@ def _settings_page( "opens_local": form.opens_at.astimezone(tz).strftime("%Y-%m-%dT%H:%M") if form.opens_at else "", + "invite_local": _local(form.invite_at, tz), + "remind_first_local": _local(form.remind_first_at, tz), + "remind_last_local": _local(form.remind_last_at, tz), "closes_local": form.closes_at.astimezone(tz).strftime("%Y-%m-%dT%H:%M") if form.closes_at else "", diff --git a/surveybox/web/routes/invitation.py b/surveybox/web/routes/invitation.py new file mode 100644 index 0000000..c46c920 --- /dev/null +++ b/surveybox/web/routes/invitation.py @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +"""Persönliche Einladungslinks (Gäste) und Abmelden von Einladungsmails. + +/i/ öffnet das Formular: Ein Cookie (nur für dieses Formular) gibt +den Zugang frei, auch bei "Nur Eingeladene" oder Link mit Passwort. Hat die +Person schon teilgenommen, führt der Link zu ihrer Antwort (neuer persönlicher +Link, ein früherer wird ungültig). + +/mail/invitation/: keine Mails mehr zu dieser Einladung oder die +Einladung samt Adresse löschen. Wie bei den übrigen Abmeldelinks ohne Cookies +und ohne CSRF-Token (RFC 8058); die Signatur im Schlüssel ist die Berechtigung. +""" + +from __future__ import annotations + +from fastapi import APIRouter, Request +from fastapi.responses import RedirectResponse, Response + +from surveybox.forms import guests, invitations +from surveybox.forms.service import FillState, fill_state +from surveybox.models import Form as FormModel +from surveybox.models import FormInvitation +from surveybox.models import Response as ResponseModel +from surveybox.web.deps import AppSettings, Db, FormFields +from surveybox.web.templating import render + +router = APIRouter(prefix="/i", include_in_schema=False) +stop_router = APIRouter(prefix="/mail/invitation", include_in_schema=False) + + +def _invalid(request: Request) -> Response: + return render(request, "invitation.html", {"invalid": True}, status_code=404) + + +def _find(db: Db, settings: AppSettings, token: str) -> tuple[FormInvitation, FormModel] | None: + invitation = invitations.find_by_token(db, settings.secret_key.get_secret_value(), token) + if invitation is None: + return None + form = db.get(FormModel, invitation.form_id) + if form is None or form.is_template or fill_state(form) == FillState.DRAFT: + return None + return invitation, form + + +@router.get("/{token}") +def open_invitation(request: Request, db: Db, settings: AppSettings, token: str) -> Response: + found = _find(db, settings, token) + if found is None: + return _invalid(request) + invitation, form = found + if invitation.response_id is not None and not form.allow_multiple and not form.anonymous: + response = db.get(ResponseModel, invitation.response_id) + if response is not None: + link = guests.issue_link(response) + db.commit() + return RedirectResponse(f"/r/{link}", status_code=303) + redirect = RedirectResponse(f"/f/{form.share_token}", status_code=303) + redirect.set_cookie( + invitations.cookie_name(form), token, + max_age=int(invitations.COOKIE_AGE.total_seconds()), httponly=True, + secure=settings.uses_https, samesite="lax", path=f"/f/{form.share_token}", + ) + return redirect + + +@stop_router.get("/{token}") +def stop_page(request: Request, db: Db, settings: AppSettings, token: str) -> Response: + found = _find(db, settings, token) + if found is None: + return _invalid(request) + invitation, form = found + return render(request, "invitation.html", { + "form": form, "token": token, "stopped": invitation.unsubscribed_at is not None}) + + +@stop_router.post("/{token}") +def stop(request: Request, db: Db, settings: AppSettings, token: str, + fields: FormFields) -> Response: + found = _find(db, settings, token) + if found is None: + return _invalid(request) + invitation, form = found + if (fields.get("action") or [""])[0] == "delete": + db.delete(invitation) + db.commit() + return render(request, "invitation.html", {"form": form, "deleted": True}) + invitations.stop(invitation) # auch Ein-Klick-Abmeldung des Mailprogramms + db.commit() + return render(request, "invitation.html", {"form": form, "token": token, "stopped": True, + "done": True}) diff --git a/surveybox/web/templates/fill_done.html b/surveybox/web/templates/fill_done.html index 7d75803..1c51bd7 100644 --- a/surveybox/web/templates/fill_done.html +++ b/surveybox/web/templates/fill_done.html @@ -7,6 +7,7 @@

{{ form.title }}

{% if already %}

{{ _('You have already filled in this form.') }}

+ {% if invited_link is defined and invited_link %}

{{ _('Open the link from your invitation again to view your answer.') }}

{% endif %} {% elif edited %}

{{ _('Your changes have been saved.') }}

{% else %} diff --git a/surveybox/web/templates/form_designer.html b/surveybox/web/templates/form_designer.html index 1a45ab7..5af0de6 100644 --- a/surveybox/web/templates/form_designer.html +++ b/surveybox/web/templates/form_designer.html @@ -29,6 +29,7 @@ {{ _('Answers') }} ({{ responses }}) {% endif %} {% if is_owner %}{{ _('Team') }}{% endif %} + {% if request.state.form_level >= 2 and not form.is_template %}{{ _('Invitations') }}{% endif %} {% if request.state.form_level >= 2 %}{{ _('History') }}{% endif %} {% if not form.is_template %}{{ _('Follow-up emails') }}{% endif %} {% if form.comments_mode != 'off' and not form.is_template %}{{ _('Comments') }}{% if pending_comments %} ({{ ngettext('%(num)d new', '%(num)d new', pending_comments) }}){% endif %}{% endif %} diff --git a/surveybox/web/templates/form_invitations.html b/surveybox/web/templates/form_invitations.html new file mode 100644 index 0000000..6761cd8 --- /dev/null +++ b/surveybox/web/templates/form_invitations.html @@ -0,0 +1,101 @@ +{% extends "base.html" %} +{% block title %}{{ _('Invitations') }} · {{ form.title }} · {{ appearance.name }}{% endblock %} + +{% macro when(value, empty) -%}{% if value %}{{ value | datetime }}{% else %}{{ empty }}{% endif %}{%- endmacro %} + +{% block content %} +

← {{ form.title }}

+

{{ _('Invitations') }}

+ +
+

{{ _('Dates') }}

+
+
{{ _('Invitations') }}
{{ when(form.invite_at, _('as soon as the form is open')) }}
+
{{ _('First reminder') }}
{{ when(form.remind_first_at, _('none')) }}
+
{{ _('Last reminder') }}
{{ when(form.remind_last_at, _('none')) }}
+
{{ _('Access list') }}
{% if form.invite_accounts %}{{ _('People and groups of the access list are invited by email.') }}{% else %}{{ _('People and groups of the access list are only reminded, not invited.') }}{% endif %}
+
+

{{ _('Change dates') }}

+ {% if form.status == 'draft' %}

{{ _('Invitations go out once the form is published and open.') }}

{% endif %} +
+ +
+

{{ _('Invite by email address') }}

+ {% if error %}{% endif %} + {% if added %} +
+

{{ ngettext('%(num)d guest invited.', '%(num)d guests invited.', added.guests | length) }} + {{ ngettext('%(num)d person with an account invited.', '%(num)d people with an account invited.', added.accounts | length) }}

+ {% if added.already %}

{{ ngettext('%(num)d address was already invited.', '%(num)d addresses were already invited.', added.already | length) }}

{% endif %} + {% if added.inactive %}

{{ _('Not invited, account deactivated: %(list)s', list=added.inactive | join(', ')) }}

{% endif %} + {% if added.invalid %}

{{ _('Not valid, left in the field below: %(list)s', list=added.invalid | join(', ')) }}

{% endif %} +
+ {% endif %} +
+ {{ csrf_field(request) }} + + +

{{ _('Separated by commas, semicolons or line breaks; copied lists like “Erika Mustermann ” work too. Addresses of existing accounts are added to the access list and invited with the normal link (with sign-in). All others are invited as guests: each gets a personal invitation link that opens the form without an account and leads back to their own answer later.') }}

+ +
+
+ +{% if anonymous %} +
+

{{ _('This form is anonymous: who has taken part is not shown here. Reminders still go only to people who have not taken part.') }}

+
+{% endif %} + +
+

{{ _('Guests') }} ({{ guests | length }})

+ {% if guests %} +
+ + {% if not anonymous %}{% endif %} + + {% for r in guests %} + + + + + {% if not anonymous %}{% endif %} + + + {% endfor %} + +
{{ _('Email address') }}{{ _('Invited') }}{{ _('Reminded') }}{{ _('Taken part') }}
{{ r.address }}{% if r.invitation.unsubscribed_at %} {{ _('no more emails') }}{% endif %}{{ when(r.invitation.sent_at, _('planned')) }}{% if r.invitation.reminded_last_at %}{{ r.invitation.reminded_last_at | datetime }}{% elif r.invitation.reminded_first_at %}{{ r.invitation.reminded_first_at | datetime }}{% else %}–{% endif %}{% if r.participated %}{{ _('yes') }}{% else %}{{ _('not yet') }}{% endif %} +
+ {{ csrf_field(request) }} +
+
+
+

{{ _('Withdrawing an invitation makes its link invalid; an answer already given stays.') }}

+ {% else %} +

{{ _('No guests invited yet.') }}

+ {% endif %} +
+ +
+

{{ _('People with an account') }} ({{ accounts | length }})

+ {% if accounts %} +
+ + {% if not anonymous %}{% endif %} + + {% for r in accounts %} + + + + + {% if not anonymous %}{% endif %} + + {% endfor %} + +
{{ _('Name') }}{{ _('Invited') }}{{ _('Reminded') }}{{ _('Taken part') }}
{{ r.name }} {{ r.address }}{{ when(r.invitation.sent_at, '–') }}{% if r.invitation.reminded_last_at %}{{ r.invitation.reminded_last_at | datetime }}{% elif r.invitation.reminded_first_at %}{{ r.invitation.reminded_first_at | datetime }}{% else %}–{% endif %}{% if r.participated %}{{ _('yes') }}{% else %}{{ _('not yet') }}{% endif %}
+
+ {% else %} +

{{ _('Accounts appear here once they are invited: added above, or from the access list when invitations go out.') }}

+ {% endif %} +

{{ _('Edit access list') }}

+
+{% endblock %} diff --git a/surveybox/web/templates/form_settings.html b/surveybox/web/templates/form_settings.html index 5f8f88b..589aa1b 100644 --- a/surveybox/web/templates/form_settings.html +++ b/surveybox/web/templates/form_settings.html @@ -42,7 +42,21 @@

{% if form.link_password_hash %}{{ _('A password is set. Leave empty to keep it.') }}{% else %}{{ _('Only needed for “link and password”.') }}{% endif %}

-

{{ _('For “selected users and groups” you choose them on the next page.') }}

+

{{ _('For “only invited people” you choose users and groups on the next page; guests are invited by email under “Invitations”. Personal invitation links open the form with every kind of access.') }}

+ + +
+

{{ _('Invitations and reminders') }}

+ +

{{ _('Guests and accounts you add under “Invitations” are always invited by email.') }}

+ + + + + + +

{{ _('The dates lie between the start and the end of participation, if those are set; reminders come after the invitation. Reminded are invited people who have not taken part yet and were invited before the reminder. People with an account can switch these emails off in their account, guests with a link in every email.') }}

+ {% if not form.is_template %}

{{ _('Invite by email address') }} →

{% endif %}
@@ -57,9 +71,6 @@

{{ _('For signed-in participants and for guests with their personal link; not for anonymous forms.') }}

- - -

{{ _('Only for access “Selected users and groups” and with an end date. Each person gets the reminder once, by email; they can switch reminders off in their account.') }}