Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4a3921542 | ||
|
|
94466378c7 | ||
|
|
e99d024056 | ||
|
|
34cd35f4ab |
No files matched your search
+1
-1
@@ -23,7 +23,7 @@ SURVEYBOX_NET_SUBNET=172.30.40.0/24
|
||||
# --- Instanz --------------------------------------------------------------
|
||||
# Öffentliche Adresse, wie Nutzer sie aufrufen. Später nicht mehr ändern:
|
||||
# Passkeys sind an diese Domain gebunden.
|
||||
SURVEYBOX_PUBLIC_URL=https://foo.bar
|
||||
SURVEYBOX_PUBLIC_URL=https://test.umfrage.cloud.mmorath.de
|
||||
# Mindestens 32 Zeichen. Erzeugen mit: openssl rand -hex 32
|
||||
# NIE ÄNDERN, sobald Konten existieren: Daraus abgeleitet sind u. a. die
|
||||
# Verschlüsselung der TOTP-Geheimnisse und die Wiederherstellungscodes.
|
||||
|
||||
+10
-2
@@ -4,7 +4,7 @@ Alle nennenswerten Änderungen an Surveybox. Versionen folgen
|
||||
[Semantic Versioning](https://semver.org/lang/de/): Eine neue Hauptversion
|
||||
kann Anpassungen beim Update verlangen; sie stehen dann hier.
|
||||
|
||||
## 1.0.0 – 2026-11-26
|
||||
## 1.1.0 – 2026-11-26
|
||||
|
||||
Erste stabile Version.
|
||||
|
||||
@@ -14,7 +14,15 @@ Erste stabile Version.
|
||||
Fragengruppe), Bildauswahl, Bilder und Videos zu Fragen, Datei-Upload.
|
||||
- Bedingungen für Fragen, Abschnitte und Seiten; mehrseitige Formulare.
|
||||
- Abstimmungen über Texte oder Termine mit Vorschlägen, Bestätigung und
|
||||
Kalender (Datei und Abo-Link).
|
||||
Kalender (Datei und Abo-Link); bei einem neuen Vorschlag erfahren alle, die
|
||||
schon teilgenommen haben, davon und können ihre Antwort ergänzen. Ein
|
||||
festgelegter Termin geht an alle, die abgestimmt haben (auch per E-Mail
|
||||
eingeladene Gäste), mit eigener Stimme, auf Wunsch den Anzahlen und dem
|
||||
Abo-Link; Ergebnisse auf Wunsch mit Namen.
|
||||
- Abschließen und Archivieren: Abgeschlossene Formulare bleiben für
|
||||
Teilnehmende lesbar (eigene Antwort, festgelegte Termine, Ergebnisse),
|
||||
archivierte sind für sie nicht mehr erreichbar und stehen im Archiv der
|
||||
Formularliste.
|
||||
- Teilnahme mit Plätzen, Warteliste und Nachrücken; Fragengruppen als
|
||||
kompakte Tabelle für Schichtpläne; eingetragene Namen anzeigen.
|
||||
- Zugang für alle Angemeldeten, nur Eingeladene (Benutzer, Gruppen, Gäste),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Formulare, Umfragen, Anmeldelisten, Schichtpläne und Terminabstimmungen in
|
||||
einer selbst gehosteten Anwendung, gebaut mit Blick auf Datenschutz und
|
||||
Sicherheit. Version 1.0.0, Lizenz AGPL-3.0-or-later.
|
||||
Sicherheit. Version 1.1.0, Lizenz AGPL-3.0-or-later.
|
||||
|
||||
## Was Surveybox kann
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
Surveybox ist eine selbst gehostete Anwendung für Formulare, Umfragen,
|
||||
Anmeldelisten, Schichtpläne und Terminabstimmungen. Diese Dokumentation gilt
|
||||
für Version 1.0 und ist in Teile für die verschiedenen Leserinnen und Leser
|
||||
für Version 1.1.0 und ist in Teile für die verschiedenen Leserinnen und Leser
|
||||
gegliedert.
|
||||
|
||||
## Für wen welcher Teil
|
||||
|
||||
+25
-4
@@ -117,11 +117,13 @@ brauchen keine Antwort.
|
||||
Bei einer Abstimmung stimmen Sie für jede Option einzeln ab, etwa mit Ja,
|
||||
Vielleicht oder Nein. Ist es erlaubt, schlagen Sie unter *Weitere Option
|
||||
vorschlagen* bzw. *Weiteren Termin vorschlagen* etwas Eigenes vor. Ihr
|
||||
Vorschlag erscheint danach für alle und zählt als Ihr „Ja“.
|
||||
Vorschlag erscheint danach für alle und zählt als Ihr „Ja“. Wer schon
|
||||
teilgenommen hat, bekommt eine Mail über den neuen Vorschlag und kann seine
|
||||
Antwort ergänzen, sofern das Formular Änderungen erlaubt.
|
||||
|
||||
Später bestätigen die Verantwortlichen eine oder mehrere Optionen. Sie
|
||||
erscheinen dann als *bestätigt*; mit Konto (und bei Gästen mit bestätigter
|
||||
Adresse) bekommen Sie dazu eine Mail. Bietet das Formular einen Kalender an,
|
||||
erscheinen dann als *bestätigt*, und alle, die abgestimmt haben und deren
|
||||
Adresse bekannt ist, bekommen eine Mail (siehe [Nach dem Ende](#nach-dem-ende)). Bietet das Formular einen Kalender an,
|
||||
holen Sie die bestätigten Termine mit *Bestätigte Termine in meinen Kalender*
|
||||
als Kalenderdatei in Ihr Kalenderprogramm.
|
||||
|
||||
@@ -222,7 +224,24 @@ Telefon, steht bei der Antwort ein Vermerk, warum.
|
||||
Wenn das Formular es vorsieht, sehen Sie nach Ihrer Teilnahme oder nach dem
|
||||
Ende die Ergebnisse: Anzahlen, Balken, Durchschnitte, Abstimmungen und die
|
||||
Belegung von Plätzen. Freitexte, Dateien und persönliche Angaben anderer
|
||||
erscheinen dort nie.
|
||||
erscheinen dort nie. Bei Abstimmungen kann das Formular zusätzlich zeigen, wer
|
||||
wie gestimmt hat; darauf weist es vor der Abstimmung oben hin.
|
||||
|
||||
### Nach dem Ende
|
||||
|
||||
Ist ein Formular abgeschlossen, öffnet derselbe Link eine Übersicht: Ihre
|
||||
eigene Antwort, festgelegte Termine mit Kalenderdatei und Abo-Link und, wenn
|
||||
freigegeben, die Ergebnisse. Als Gast nutzen Sie dafür Ihren persönlichen
|
||||
Link oder den Link aus Ihrer Einladung.
|
||||
|
||||
Wird ein Termin festgelegt, bekommen Sie eine Mail, wenn Sie abgestimmt haben
|
||||
und Ihre Adresse bekannt ist (Konto, Einladung per E-Mail oder bestätigte
|
||||
Adresse). Sie nennt den Termin, Ihre damalige Stimme und, wenn die Ergebnisse
|
||||
freigegeben sind, wie viele Ja, Vielleicht und Nein es je Option gab.
|
||||
|
||||
Archivierte Formulare lassen sich nicht mehr öffnen, auch nicht über Ihre
|
||||
Links. Ihre Daten können Sie trotzdem jederzeit über *Meine Links
|
||||
anfordern* herunterladen oder löschen lassen (siehe [Ihre Daten](#ihre-daten)).
|
||||
|
||||
### Kommentare
|
||||
|
||||
@@ -237,6 +256,8 @@ Surveybox schickt Ihnen zum Beispiel:
|
||||
- eine Bestätigung Ihrer Teilnahme mit Link zum Formular,
|
||||
- eine Nachricht, wenn Sie von der Warteliste nachrücken oder ein Termin
|
||||
bestätigt oder gestrichen wurde,
|
||||
- einen Hinweis, wenn in einer Abstimmung, an der Sie teilgenommen haben,
|
||||
jemand eine weitere Option vorschlägt,
|
||||
- Einladungen und Erinnerungen zu Formularen,
|
||||
- Folge-Mails mit Unterlagen (als Download-Links, die nach einer Weile
|
||||
ablaufen),
|
||||
|
||||
@@ -84,6 +84,25 @@ 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.
|
||||
Wird in einer Abstimmung ein Termin festgelegt, bekommen eingeladene Gäste, die
|
||||
abgestimmt haben, eine Mail an die Adresse der Einladung, mit ihrer eigenen
|
||||
Stimme; wer die Einladung abbestellt hat, nicht.
|
||||
|
||||
### Namen in Ergebnissen
|
||||
|
||||
Formulare können Teilnehmenden zeigen, wer sich bei Plätzen eingetragen hat
|
||||
und, in den Ergebnissen, wer bei Abstimmungen wie gestimmt hat (voller Name
|
||||
oder Vorname mit Anfangsbuchstabe; nie E-Mail-Adressen). Beides ist
|
||||
standardmäßig aus, bei anonymen Formularen nicht möglich, und das Formular
|
||||
weist vor dem Absenden darauf hin. Wer das einschaltet, sollte es im
|
||||
Datenschutzhinweis des Formulars erwähnen.
|
||||
|
||||
### Abschließen und Archivieren
|
||||
|
||||
Abgeschlossene Formulare bleiben für Teilnehmende lesbar (eigene Antwort,
|
||||
festgelegte Termine, freigegebene Ergebnisse). Archivierte Formulare sind über
|
||||
keinen Link mehr erreichbar; Auskunft und Löschung für Gäste laufen weiter über
|
||||
„Meine Links“. Archivieren ändert die Löschfrist nicht.
|
||||
|
||||
### Verlauf und Papierkorb
|
||||
|
||||
|
||||
+48
-10
@@ -41,7 +41,7 @@ erreichbar. Die Kennung ist zufällig und nicht zu erraten.
|
||||
Der Designer zeigt alle Fragen untereinander. Oben stehen die Bereiche des
|
||||
Formulars: *Einstellungen*, *Live-Vorschau*, *Antworten*, *Team*,
|
||||
*Einladungen*, *Verlauf*, *Folge-Mails* und *Kommentare*, dazu *Kopieren*,
|
||||
*Als Vorlage speichern*, *Veröffentlichen*, *Schließen* und *Wieder öffnen*.
|
||||
*Als Vorlage speichern*, *Veröffentlichen*, *Abschließen*, *Wieder öffnen* und *Archivieren*.
|
||||
|
||||
- **Frage hinzufügen:** unten Fragetyp wählen und *Frage hinzufügen*.
|
||||
- **Bearbeiten:** öffnet den Frage-Editor mit Text, Hilfetext, Pflicht,
|
||||
@@ -110,17 +110,36 @@ geben ihr die Bedingung *Nur anzeigen, wenn „Kommen Sie?“ ist „Ja“*.
|
||||
Optionen sind Texte oder Termine (Datum, optional Uhrzeit und Dauer; ohne
|
||||
Uhrzeit gilt der ganze Tag). Je Option stimmen Teilnehmende mit Ja/Nein oder
|
||||
Ja/Vielleicht/Nein ab. Mit *Teilnehmende dürfen weitere Optionen vorschlagen*
|
||||
kommen eigene Vorschläge dazu; ein Vorschlag zählt als Ja der Person.
|
||||
kommen eigene Vorschläge dazu; ein Vorschlag zählt als Ja der Person. Alle,
|
||||
die schon teilgenommen haben, bekommen dazu eine Mail und können ihre Antwort
|
||||
um den neuen Vorschlag ergänzen. Das setzt voraus, dass Teilnehmende ihre
|
||||
Antwort ändern dürfen; sonst geht keine Mail hinaus. Bei anonymen Formularen
|
||||
gibt es diese Mail nicht.
|
||||
|
||||
Unter *Antworten* steht eine Ergebnistabelle, die Option mit den meisten „Ja“
|
||||
ist mit ★ markiert. Dort **bestätigen** Sie eine oder mehrere Optionen,
|
||||
meist nach dem Ende der Abstimmung. Teilnehmende erhalten dazu eine Mail.
|
||||
ist mit ★ markiert. Dort **bestätigen** (festlegen) Sie eine oder mehrere
|
||||
Optionen, meist nach dem Ende der Abstimmung. Alle, die abgestimmt haben und
|
||||
deren Adresse bekannt ist, bekommen dazu eine Mail:
|
||||
|
||||
- Personen mit Konto,
|
||||
- per E-Mail eingeladene Gäste (an die Adresse der Einladung, mit ihrem
|
||||
Einladungslink),
|
||||
- Gäste, die ihre Adresse beim Ausfüllen angegeben und bestätigt haben.
|
||||
|
||||
Die Mail nennt den festgelegten Termin, die eigene Stimme der Person zu jeder
|
||||
Option und, wenn die Ergebnisse für Teilnehmende freigegeben sind, die
|
||||
Anzahlen je Option (nie Namen). Dazu kommen der Link zur eigenen Antwort, die
|
||||
Kalenderdatei und, falls eingeschaltet, der Abo-Link. Gäste, die ihre Adresse
|
||||
nicht bestätigt haben, bekommen keine Mail; nach sieben Tagen löscht Surveybox
|
||||
unbestätigte Adressen ohnehin.
|
||||
|
||||
**Kalender** (Einstellungen → *Plätze, Kalender und Kommentare*): aus,
|
||||
Kalenderdatei (ICS) für Teilnehmende oder zusätzlich ein Abo-Link für
|
||||
Kalenderprogramme. Enthalten sind nur bestätigte Termine, ohne Angaben zu
|
||||
Personen. Der Abo-Link funktioniert ohne Anmeldung; wer ihn kennt, sieht die
|
||||
Termine. *Abo-Link erneuern* macht den alten ungültig.
|
||||
Personen. Teilnehmende finden Datei und Abo-Link nach dem Absenden, auf der
|
||||
Seite des abgeschlossenen Formulars, auf ihrem persönlichen Link und in der
|
||||
Mail zum festgelegten Termin. Der Abo-Link funktioniert ohne Anmeldung; wer
|
||||
ihn kennt, sieht die Termine. *Abo-Link erneuern* macht den alten ungültig.
|
||||
|
||||
### Teilnahme mit Plätzen und Schichtpläne
|
||||
|
||||
@@ -202,7 +221,7 @@ Die Größengrenzen legt die Administration fest.
|
||||
### Allgemein
|
||||
|
||||
Titel, Beschreibung, **Öffnet am** und **Schließt am** (beides optional) und
|
||||
die Gruppe. Ohne Enddatum bleibt ein Formular offen, bis Sie es schließen.
|
||||
die Gruppe. Ohne Enddatum bleibt ein Formular offen, bis Sie es abschließen.
|
||||
|
||||
### Wer darf ausfüllen
|
||||
|
||||
@@ -273,13 +292,25 @@ organisiert. Leer gilt die Adresse aus den E-Mail-Einstellungen der Instanz.
|
||||
|
||||
Termine für den Versand, siehe [Einladungen und Erinnerungen](#einladungen-und-erinnerungen).
|
||||
|
||||
## Veröffentlichen, schließen, teilen
|
||||
## Veröffentlichen, abschließen, archivieren
|
||||
|
||||
- **Veröffentlichen:** Das Formular ist ab *Öffnet am* (oder sofort) unter
|
||||
seinem Link erreichbar. Den Link zeigt der Designer.
|
||||
- **Schließen:** beendet die Teilnahme sofort; *Wieder öffnen* setzt sie
|
||||
- **Abschließen:** beendet die Teilnahme sofort; *Wieder öffnen* setzt sie
|
||||
fort. Mit *Schließt am* geschieht das automatisch; Sie bekommen dann eine
|
||||
Mail.
|
||||
Mail. Ein abgeschlossenes Formular bleibt für Teilnehmende lesbar: Unter
|
||||
demselben Link sehen sie ihre eigene Antwort, festgelegte Termine mit
|
||||
Kalenderdatei und Abo-Link und, wenn freigegeben, die Ergebnisse. Sind die
|
||||
Ergebnisse noch nicht freigegeben, bietet *Abschließen* an, sie zugleich
|
||||
freizugeben („nach dem Schließen des Formulars“).
|
||||
- **Archivieren:** nur für abgeschlossene Formulare. Das Formular verschwindet
|
||||
aus der Liste in den Bereich *Archiv* unten in der Formularliste. Teilnehmende
|
||||
können es nicht mehr öffnen, auch nicht über persönliche Links,
|
||||
Einladungslinks, den Abo-Link oder Dokumente aus Folge-Mails; sie sehen
|
||||
einen Hinweis, dass es archiviert ist. Antworten, Auswertung, Export und
|
||||
Einstellungen bleiben für Sie verfügbar, Folge-Mails werden nicht mehr
|
||||
verschickt. *Aus dem Archiv holen* macht das Formular wieder lesbar
|
||||
(abgeschlossen). Die Löschfrist läuft unabhängig davon weiter.
|
||||
- **Einbetten:** Hat die Administration es erlaubt, zeigt der Designer einen
|
||||
`<iframe>`-Code für Seiten derselben Domain. Auf fremden Seiten, etwa der
|
||||
Website eines Vereins, besser verlinken.
|
||||
@@ -410,6 +441,13 @@ Freitexte, Dateien und personenbezogene Fragen. Bei sehr wenigen Antworten
|
||||
lassen Zahlen Rückschlüsse auf einzelne Personen zu; wählen Sie die
|
||||
Einstellung dann mit Bedacht.
|
||||
|
||||
*Abstimmungen in den Ergebnissen* legt fest, ob Teilnehmende bei Abstimmungen
|
||||
nur die Anzahl je Option sehen (Standard) oder auch, wer wie gestimmt hat:
|
||||
mit Vor- und Nachname oder mit Vorname und Anfangsbuchstabe. Der Name kommt
|
||||
aus dem Teilnehmer-Namen, sonst aus dem Konto; Gäste ohne Namen erscheinen
|
||||
als „Gast“. Das Formular weist vor der Abstimmung darauf hin. Bei anonymen
|
||||
Formularen gibt es keine Namen.
|
||||
|
||||
## Benachrichtigungen für Verwalter
|
||||
|
||||
| Ereignis | Empfänger |
|
||||
|
||||
@@ -46,6 +46,8 @@ ACTIONS = {
|
||||
"form.created",
|
||||
"form.deleted",
|
||||
"form.status_changed",
|
||||
"form.archived",
|
||||
"form.unarchived",
|
||||
"form.copied",
|
||||
"form.team_changed",
|
||||
"admin.settings_changed",
|
||||
|
||||
+37
-24
@@ -129,6 +129,40 @@ def _display_name(full: str, mode: str) -> str:
|
||||
return types.short_name(first, last) if last else full
|
||||
|
||||
|
||||
def response_names(
|
||||
db: Session, form: Form, users: dict[int, int | None], mode: str
|
||||
) -> dict[int, str]:
|
||||
"""Anzeigename je Antwort (Antwort-ID -> Konto-ID): aus "Teilnehmer-Name", sonst aus
|
||||
dem Konto, sonst "Gast". `mode` "short": Vorname und Anfangsbuchstabe."""
|
||||
from surveybox.i18n import gettext
|
||||
from surveybox.models import Answer, UserAccount
|
||||
|
||||
name_q = next((q for q in form.questions if q.type == "participant_name"), None)
|
||||
given: dict[int, str] = {}
|
||||
if name_q is not None and users:
|
||||
for answer in db.scalars(select(Answer).where(
|
||||
Answer.question_id == name_q.id, Answer.response_id.in_(set(users)))):
|
||||
parts = types.name_parts({"value_json": answer.value_json})
|
||||
if parts["first"] or parts["last"]:
|
||||
given[answer.response_id] = (
|
||||
types.short_name(parts["first"], parts["last"]) if mode == "short"
|
||||
else f"{parts['first']} {parts['last']}".strip()
|
||||
)
|
||||
user_ids = {uid for rid, uid in users.items() if uid is not None and rid not in given}
|
||||
accounts = {uid: name for uid, name in db.execute(
|
||||
select(UserAccount.id, UserAccount.display_name).where(UserAccount.id.in_(user_ids))
|
||||
)} if user_ids else {}
|
||||
guest = gettext("Guest")
|
||||
result: dict[int, str] = {}
|
||||
for rid, uid in users.items():
|
||||
name = given.get(rid)
|
||||
if name is None:
|
||||
account = accounts.get(uid) if uid is not None else None
|
||||
name = _display_name(account, mode) if account else guest
|
||||
result[rid] = name
|
||||
return result
|
||||
|
||||
|
||||
def names_for_form(db: Session, form: Form) -> dict[int, dict[str, SlotNames]]:
|
||||
"""Wer sich schon eingetragen hat, je Teilnahme-Feld und Option (in Reihenfolge).
|
||||
|
||||
@@ -139,10 +173,6 @@ def names_for_form(db: Session, form: Form) -> dict[int, dict[str, SlotNames]]:
|
||||
mode = form.slot_names
|
||||
if mode not in ("full", "short") or form.anonymous:
|
||||
return {}
|
||||
from surveybox.i18n import gettext
|
||||
from surveybox.models import Answer, UserAccount
|
||||
|
||||
name_q = next((q for q in form.questions if q.type == "participant_name"), None)
|
||||
rows = db.execute(
|
||||
select(Booking.question_id, Booking.option_id, Booking.status, Booking.response_id,
|
||||
Response.user_id)
|
||||
@@ -152,28 +182,11 @@ def names_for_form(db: Session, form: Form) -> dict[int, dict[str, SlotNames]]:
|
||||
).all()
|
||||
if not rows:
|
||||
return {}
|
||||
response_ids = {r.response_id for r in rows}
|
||||
given: dict[int, str] = {}
|
||||
if name_q is not None:
|
||||
for answer in db.scalars(select(Answer).where(
|
||||
Answer.question_id == name_q.id, Answer.response_id.in_(response_ids))):
|
||||
parts = types.name_parts({"value_json": answer.value_json})
|
||||
if parts["first"] or parts["last"]:
|
||||
given[answer.response_id] = (
|
||||
types.short_name(parts["first"], parts["last"]) if mode == "short"
|
||||
else f"{parts['first']} {parts['last']}".strip()
|
||||
)
|
||||
user_ids = {r.user_id for r in rows if r.user_id is not None and r.response_id not in given}
|
||||
accounts = {uid: name for uid, name in db.execute(
|
||||
select(UserAccount.id, UserAccount.display_name).where(UserAccount.id.in_(user_ids))
|
||||
)} if user_ids else {}
|
||||
guest = gettext("Guest")
|
||||
names_by_response = response_names(
|
||||
db, form, {r.response_id: r.user_id for r in rows}, mode)
|
||||
result: dict[int, dict[str, SlotNames]] = {}
|
||||
for row in rows:
|
||||
name = given.get(row.response_id)
|
||||
if name is None:
|
||||
account = accounts.get(row.user_id) if row.user_id is not None else None
|
||||
name = _display_name(account, mode) if account else guest
|
||||
name = names_by_response[row.response_id]
|
||||
names = result.setdefault(row.question_id, {}).setdefault(row.option_id, SlotNames())
|
||||
(names.waiting if row.status == BookingStatus.WAITING else names.confirmed).append(name)
|
||||
return result
|
||||
|
||||
@@ -258,7 +258,9 @@ def find_document(db: Session, public_id: uuid.UUID) -> tuple[FollowupDocument,
|
||||
row = db.execute(
|
||||
select(FollowupDocument, MediaFile)
|
||||
.join(MediaFile, MediaFile.id == FollowupDocument.media_id)
|
||||
.where(FollowupDocument.public_id == public_id)
|
||||
.join(Followup, Followup.id == FollowupDocument.followup_id)
|
||||
.join(Form, Form.id == Followup.form_id)
|
||||
.where(FollowupDocument.public_id == public_id, Form.archived_at.is_(None))
|
||||
).first()
|
||||
return (row[0], row[1]) if row is not None else None
|
||||
|
||||
@@ -584,6 +586,7 @@ def run_due(db: Session, settings: Settings, now: datetime) -> int:
|
||||
Followup.trigger.in_([FollowupTrigger.CLOSE, FollowupTrigger.AT]),
|
||||
Form.is_template.is_(False),
|
||||
Form.status != FormStatus.DRAFT,
|
||||
Form.archived_at.is_(None),
|
||||
)
|
||||
).all()
|
||||
for followup, form in rows:
|
||||
|
||||
@@ -94,8 +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", "invite_at", "remind_first_at",
|
||||
"remind_last_at", "invite_accounts",
|
||||
"consent_text", "slot_names", "poll_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")
|
||||
|
||||
@@ -41,19 +41,52 @@ def offered(form: Form) -> bool:
|
||||
|
||||
|
||||
def build(db: Session, form: Form, tz: ZoneInfo) -> list[Any]:
|
||||
"""Auswertung je Frage, ohne Freitexte und personenbezogene Fragen."""
|
||||
"""Auswertung je Frage, ohne Freitexte und personenbezogene Fragen. Bei Abstimmungen
|
||||
auf Wunsch (Einstellung poll_names) mit den Namen je Stimme."""
|
||||
names = poll_names(db, form)
|
||||
result = []
|
||||
for item in summary(db, form, None, tz):
|
||||
if item.question.personal:
|
||||
continue
|
||||
item.texts = []
|
||||
item.more_texts = 0
|
||||
for row in item.poll_rows:
|
||||
row["names"] = names.get(item.question.id, {}).get(row["id"], {})
|
||||
if (item.bars or item.poll_rows or item.slot_rows or item.average is not None
|
||||
or item.total is not None or item.note):
|
||||
result.append(item)
|
||||
return result
|
||||
|
||||
|
||||
def poll_names(db: Session, form: Form) -> dict[int, dict[str, dict[str, list[str]]]]:
|
||||
"""Wer bei Abstimmungen wie gestimmt hat: Frage -> Option -> Stimme -> Namen.
|
||||
Leer, wenn das Formular keine Namen zeigt oder anonym ist."""
|
||||
mode = form.poll_names
|
||||
polls = [q.id for q in form.questions if q.type == "poll"]
|
||||
if mode not in ("full", "short") or form.anonymous or not polls:
|
||||
return {}
|
||||
from sqlalchemy import select
|
||||
|
||||
from surveybox.forms.booking import response_names
|
||||
from surveybox.models import Answer, Response
|
||||
|
||||
rows = db.execute(
|
||||
select(Answer.question_id, Answer.value_json, Response.id, Response.user_id)
|
||||
.join(Response, Response.id == Answer.response_id)
|
||||
.where(Response.form_id == form.id, Answer.question_id.in_(polls))
|
||||
.order_by(Response.submitted_at, Response.id)
|
||||
).all()
|
||||
names = response_names(db, form, {r.id: r.user_id for r in rows}, mode)
|
||||
result: dict[int, dict[str, dict[str, list[str]]]] = {}
|
||||
for row in rows:
|
||||
votes = (row.value_json or {}).get("votes") or {}
|
||||
for option_id, vote in votes.items():
|
||||
if vote in ("yes", "maybe", "no"):
|
||||
(result.setdefault(row.question_id, {}).setdefault(option_id, {})
|
||||
.setdefault(vote, []).append(names[row.id]))
|
||||
return result
|
||||
|
||||
|
||||
def cookie_name(form: Form) -> str:
|
||||
return f"surveybox_done_{form.share_token[:16]}"
|
||||
|
||||
|
||||
@@ -168,9 +168,16 @@ def fill_state(form: Form, now: datetime | None = None) -> FillState:
|
||||
return FillState.OPEN
|
||||
|
||||
|
||||
def display_state(form: Form) -> str:
|
||||
"""Zustand für die Anzeige in der Verwaltung: wie fill_state, dazu "archived"."""
|
||||
return "archived" if form.archived_at is not None else str(fill_state(form))
|
||||
|
||||
|
||||
def set_status(form: Form, status: str) -> None:
|
||||
if status not in {s.value for s in FormStatus}:
|
||||
raise FormError("status_invalid")
|
||||
if form.archived_at is not None:
|
||||
raise FormError("archived")
|
||||
if form.is_template and status != FormStatus.DRAFT:
|
||||
raise FormError("template_not_publishable")
|
||||
if status == FormStatus.OPEN and not any(
|
||||
@@ -188,6 +195,29 @@ def set_status(form: Form, status: str) -> None:
|
||||
form.status = status
|
||||
|
||||
|
||||
def archive(form: Form) -> None:
|
||||
"""Abgeschlossenes Formular ins Archiv: für Teilnehmende nicht mehr erreichbar.
|
||||
|
||||
Läuft das Enddatum ab, ohne dass jemand geschlossen hat, wird es hier geschlossen;
|
||||
die Löschfrist beginnt weiter mit dem Enddatum."""
|
||||
if form.is_template or form.archived_at is not None:
|
||||
raise FormError("status_invalid")
|
||||
if fill_state(form) != FillState.CLOSED:
|
||||
raise FormError("archive_not_closed")
|
||||
if form.status != FormStatus.CLOSED:
|
||||
form.status = FormStatus.CLOSED
|
||||
if form.closes_at is None:
|
||||
form.closed_at = datetime.now(UTC)
|
||||
form.archived_at = datetime.now(UTC)
|
||||
|
||||
|
||||
def unarchive(form: Form) -> None:
|
||||
"""Zurück aus dem Archiv: wieder abgeschlossen und für Teilnehmende lesbar."""
|
||||
if form.archived_at is None:
|
||||
raise FormError("status_invalid")
|
||||
form.archived_at = None
|
||||
|
||||
|
||||
def update_settings(
|
||||
db: Session,
|
||||
form: Form,
|
||||
@@ -273,6 +303,7 @@ def update_settings(
|
||||
form.calendar_token = new_token(24)
|
||||
form.comments_mode = choice("comments_mode", {"off", "moderated", "public"}, "moderated")
|
||||
form.slot_names = choice("slot_names", {"off", "full", "short"}, "off")
|
||||
form.poll_names = choice("poll_names", {"off", "full", "short"}, "off")
|
||||
form.comments_anonymous = _first(fields, "comments_anonymous") == "on"
|
||||
form.comments_notify = _first(fields, "comments_notify") == "on"
|
||||
try:
|
||||
@@ -689,6 +720,8 @@ class Validation:
|
||||
errors: dict[int, str] = field(default_factory=dict)
|
||||
consent_error: bool = False
|
||||
hidden: set[int] = field(default_factory=set) # durch Bedingungen ausgeblendet
|
||||
# Neue Vorschläge dieser Teilnahme: (Frage-ID, Options-ID), siehe apply_proposals
|
||||
proposed: list[tuple[int, str]] = field(default_factory=list)
|
||||
|
||||
@property
|
||||
def ok(self) -> bool:
|
||||
@@ -788,6 +821,7 @@ def apply_proposals(
|
||||
votes = dict((stored.get("value_json") or {}).get("votes") or {})
|
||||
votes[option["id"]] = "yes"
|
||||
stored["value_json"] = {"votes": votes}
|
||||
validation.proposed.append((question.id, option["id"]))
|
||||
return errors
|
||||
|
||||
|
||||
@@ -932,6 +966,19 @@ def calendar_events(form: Form) -> list[Any]:
|
||||
return calendar.confirmed_events(form.questions)
|
||||
|
||||
|
||||
def confirmed_polls(form: Form) -> list[tuple[Question, list[dict[str, Any]]]]:
|
||||
"""Abstimmungen mit festgelegten (bestätigten) Optionen, in Reihenfolge."""
|
||||
found: list[tuple[Question, list[dict[str, Any]]]] = []
|
||||
for question in form.questions:
|
||||
if question.type != "poll":
|
||||
continue
|
||||
chosen = set(question.config.get("confirmed") or [])
|
||||
options = [o for o in types.options_of(question) if o["id"] in chosen]
|
||||
if options:
|
||||
found.append((question, options))
|
||||
return found
|
||||
|
||||
|
||||
def find_by_calendar_token(db: Session, token: str) -> Form | None:
|
||||
if not token or len(token) > 64:
|
||||
return None
|
||||
|
||||
@@ -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 10:29+0100\n"
|
||||
"POT-Creation-Date: 2026-11-26 15:11+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: de\n"
|
||||
@@ -125,7 +125,8 @@ msgstr "Ungültige Regel (Frage fehlt oder steht nicht davor)"
|
||||
#: surveybox/forms/conditions.py surveybox/forms/evaluation.py surveybox/forms/export.py
|
||||
#: surveybox/forms/summary.py surveybox/forms/types.py surveybox/web/routes/forms.py
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/form_history_compare.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
@@ -133,7 +134,7 @@ msgstr "Ja"
|
||||
#: surveybox/forms/summary.py surveybox/forms/types.py surveybox/web/routes/forms.py
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/form_history_compare.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/form_settings.html
|
||||
#: surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/results_public.html
|
||||
msgid "No"
|
||||
msgstr "Nein"
|
||||
|
||||
@@ -185,7 +186,8 @@ msgid "Email address"
|
||||
msgstr "E-Mail-Adresse"
|
||||
|
||||
#: surveybox/forms/export.py surveybox/forms/types.py surveybox/web/templates/_fill_fields.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "Maybe"
|
||||
msgstr "Vielleicht"
|
||||
|
||||
@@ -586,6 +588,10 @@ msgstr "Von der Warteliste nachgerückt"
|
||||
msgid "Date confirmed in a poll"
|
||||
msgstr "Termin in einer Abstimmung bestätigt"
|
||||
|
||||
#: surveybox/mail/custom.py
|
||||
msgid "New option proposed in a poll"
|
||||
msgstr "Neue Option in einer Abstimmung vorgeschlagen"
|
||||
|
||||
#: surveybox/mail/custom.py
|
||||
msgid "Chosen entry or date removed"
|
||||
msgstr "Gewählter Eintrag oder Termin entfernt"
|
||||
@@ -710,9 +716,10 @@ msgstr "Der Text muss {details} oder diese Platzhalter enthalten: %(names)s"
|
||||
#: 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
|
||||
#: surveybox/web/templates/mail/proposed.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,"
|
||||
@@ -725,9 +732,10 @@ msgstr "Hallo %(name)s,"
|
||||
#: 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
|
||||
#: surveybox/web/templates/mail/proposed.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,"
|
||||
|
||||
@@ -755,6 +763,10 @@ msgstr "Folge-Mails mit Dokumenten zu Formularen, an denen ich teilgenommen habe
|
||||
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 "Someone has proposed a new option in a poll I took part in"
|
||||
msgstr "In einer Abstimmung, an der ich teilgenommen habe, wurde eine neue Option vorgeschlagen"
|
||||
|
||||
#: surveybox/mail/notify.py
|
||||
msgid "Reminder about a form I was invited to"
|
||||
msgstr "Erinnerung an ein Formular, zu dem ich eingeladen wurde"
|
||||
@@ -1121,6 +1133,14 @@ msgstr "Formular gelöscht"
|
||||
msgid "Form status changed"
|
||||
msgstr "Formularstatus geändert"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form archived"
|
||||
msgstr "Formular archiviert"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form taken out of the archive"
|
||||
msgstr "Formular aus dem Archiv geholt"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form copied"
|
||||
msgstr "Formular kopiert"
|
||||
@@ -1762,6 +1782,14 @@ msgstr "Unbekannter Status."
|
||||
msgid "Add at least one question before opening the form."
|
||||
msgstr "Fügen Sie mindestens eine Frage hinzu, bevor Sie das Formular öffnen."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "The form is archived. Take it out of the archive first."
|
||||
msgstr "Das Formular ist archiviert. Holen Sie es zuerst aus dem Archiv."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Only completed forms can be archived. Complete the form first."
|
||||
msgstr "Nur abgeschlossene Formulare lassen sich archivieren. Schließen Sie das Formular zuerst ab."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Unknown question type."
|
||||
msgstr "Unbekannter Fragetyp."
|
||||
@@ -1877,8 +1905,12 @@ msgid "Open"
|
||||
msgstr "Offen"
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Closed"
|
||||
msgstr "Geschlossen"
|
||||
msgid "Completed"
|
||||
msgstr "Abgeschlossen"
|
||||
|
||||
#: surveybox/web/routes/forms.py surveybox/web/templates/forms_list.html
|
||||
msgid "Archived"
|
||||
msgstr "Archiviert"
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "All signed-in users"
|
||||
@@ -2014,6 +2046,18 @@ msgstr "Zu dieser Adresse gibt es schon ein Konto. Bitte melden Sie sich an."
|
||||
msgid "Registration is switched off."
|
||||
msgstr "Die Registrierung ist abgeschaltet."
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html
|
||||
msgid "Decided"
|
||||
msgstr "Festgelegt"
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html
|
||||
msgid "Add confirmed dates to my calendar"
|
||||
msgstr "Bestätigte Termine in meinen Kalender"
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Subscription link for calendar programs (stays up to date if dates change):"
|
||||
msgstr "Abo-Link für Kalenderprogramme (bleibt aktuell, wenn sich Termine ändern):"
|
||||
|
||||
#: surveybox/web/templates/_comments.html
|
||||
msgid "edited"
|
||||
msgstr "bearbeitet"
|
||||
@@ -2206,7 +2250,8 @@ msgstr[1] "noch %(num)d Plätze frei"
|
||||
msgid "proposed"
|
||||
msgstr "vorgeschlagen"
|
||||
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "confirmed"
|
||||
msgstr "bestätigt"
|
||||
|
||||
@@ -3837,6 +3882,20 @@ msgstr "Nicht gefunden"
|
||||
msgid "This page does not exist."
|
||||
msgstr "Diese Seite gibt es nicht."
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "This form has been archived and can no longer be opened."
|
||||
msgstr "Dieses Formular wurde archiviert und lässt sich nicht mehr öffnen."
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "If you took part as a guest, you can still download or delete your data under “Request my links”."
|
||||
msgstr ""
|
||||
"Haben Sie als Gast teilgenommen, können Sie Ihre Daten weiterhin unter „Meine Links anfordern“ "
|
||||
"herunterladen oder löschen."
|
||||
|
||||
#: surveybox/web/templates/error.html surveybox/web/templates/guest_links.html
|
||||
msgid "Request my links"
|
||||
msgstr "Meine Links anfordern"
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "Request rejected"
|
||||
msgstr "Anfrage abgelehnt"
|
||||
@@ -3897,6 +3956,20 @@ msgstr ""
|
||||
"Bei den Eintragungen sieht jede Person, die dieses Formular öffnet, wer sich schon eingetragen "
|
||||
"hat, mit Vor- und Nachnamen."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid ""
|
||||
"In the results, participants see how each person voted in polls: first name and the initial of "
|
||||
"the last name."
|
||||
msgstr ""
|
||||
"In den Ergebnissen sehen Teilnehmende, wie jede Person bei Abstimmungen gestimmt hat: Vorname und"
|
||||
" Anfangsbuchstabe des Nachnamens."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid "In the results, participants see how each person voted in polls, with first and last name."
|
||||
msgstr ""
|
||||
"In den Ergebnissen sehen Teilnehmende, wie jede Person bei Abstimmungen gestimmt hat, mit Vor- "
|
||||
"und Nachnamen."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid "Please check the marked questions."
|
||||
msgstr "Bitte prüfen Sie die markierten Fragen."
|
||||
@@ -3987,8 +4060,22 @@ msgid "This form opens on %(date)s."
|
||||
msgstr "Dieses Formular öffnet am %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html
|
||||
msgid "This form is closed. Answers can no longer be submitted."
|
||||
msgstr "Dieses Formular ist geschlossen. Es können keine Antworten mehr abgegeben werden."
|
||||
msgid "This form is completed. Answers can no longer be submitted."
|
||||
msgstr "Dieses Formular ist abgeschlossen. Es können keine Antworten mehr abgegeben werden."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html
|
||||
msgid "Your answer"
|
||||
msgstr "Ihre Antwort"
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Your answer from %(date)s."
|
||||
msgstr "Ihre Antwort vom %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Last changed %(date)s."
|
||||
msgstr "Zuletzt geändert am %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "You have already filled in this form."
|
||||
@@ -4053,10 +4140,6 @@ msgstr "Meine Antworten ändern"
|
||||
msgid "Documents"
|
||||
msgstr "Dokumente"
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "Add confirmed dates to my calendar"
|
||||
msgstr "Bestätigte Termine in meinen Kalender"
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "Fill in again"
|
||||
msgstr "Erneut ausfüllen"
|
||||
@@ -4396,6 +4479,24 @@ msgstr "Alle Formulare"
|
||||
msgid "Template"
|
||||
msgstr "Vorlage"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
#, python-format
|
||||
msgid ""
|
||||
"This form is archived since %(date)s. Participants can no longer open it, not even with their "
|
||||
"links. Answers and export remain available."
|
||||
msgstr ""
|
||||
"Dieses Formular ist seit %(date)s archiviert. Teilnehmende können es nicht mehr öffnen, auch "
|
||||
"nicht mit ihren Links. Antworten und Export bleiben verfügbar."
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid ""
|
||||
"Completed: no further answers. Participants can still open the form and see their own answer, "
|
||||
"confirmed dates and, if released, the results. Archive the form to make it unavailable to them."
|
||||
msgstr ""
|
||||
"Abgeschlossen: keine weiteren Antworten. Teilnehmende können das Formular weiterhin öffnen und "
|
||||
"sehen ihre eigene Antwort, festgelegte Termine und, wenn freigegeben, die Ergebnisse. Archivieren"
|
||||
" Sie das Formular, damit es für sie nicht mehr erreichbar ist."
|
||||
|
||||
#: surveybox/web/templates/form_designer.html surveybox/web/templates/form_history.html
|
||||
msgid "More places are booked than available:"
|
||||
msgstr "Es sind mehr Plätze belegt als vorhanden:"
|
||||
@@ -4440,18 +4541,30 @@ msgstr "Als Vorlage speichern"
|
||||
msgid "Available to all creators"
|
||||
msgstr "Für alle Ersteller verfügbar"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Take out of the archive"
|
||||
msgstr "Aus dem Archiv holen"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Publish"
|
||||
msgstr "Veröffentlichen"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Close"
|
||||
msgstr "Schließen"
|
||||
msgid "Release the results to participants"
|
||||
msgstr "Ergebnisse für Teilnehmende freigeben"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Complete"
|
||||
msgstr "Abschließen"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Reopen"
|
||||
msgstr "Wieder öffnen"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html surveybox/web/templates/forms_list.html
|
||||
msgid "Archive"
|
||||
msgstr "Archivieren"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Opens"
|
||||
msgstr "Öffnet"
|
||||
@@ -5314,6 +5427,30 @@ msgstr ""
|
||||
"nach ihrer Teilnahme oder mit ihrem persönlichen Link. Bei sehr wenigen Antworten lässt sich aus "
|
||||
"den Ergebnissen erkennen, wie einzelne Personen geantwortet haben."
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Polls in the results"
|
||||
msgstr "Abstimmungen in den Ergebnissen"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Only the number of answers per option"
|
||||
msgstr "Nur die Anzahl der Antworten je Option"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "With names: first name and initial of the last name"
|
||||
msgstr "Mit Namen: Vorname und Anfangsbuchstabe des Nachnamens"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "With names: first and last name"
|
||||
msgstr "Mit Namen: Vor- und Nachname"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid ""
|
||||
"Applies when participants see the results: with names, everyone can see who voted how. The form "
|
||||
"tells participants about it before they vote. Not for anonymous forms."
|
||||
msgstr ""
|
||||
"Gilt, wenn Teilnehmende die Ergebnisse sehen: Mit Namen sieht jede Person, wer wie gestimmt hat. "
|
||||
"Das Formular weist vor der Abstimmung darauf hin. Nicht bei anonymen Formularen."
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Places, calendar and comments"
|
||||
msgstr "Plätze, Kalender und Kommentare"
|
||||
@@ -5516,6 +5653,15 @@ msgstr "Mitbearbeitung"
|
||||
msgid "No forms yet."
|
||||
msgstr "Noch keine Formulare."
|
||||
|
||||
#: surveybox/web/templates/forms_list.html
|
||||
msgid ""
|
||||
"Archived forms can no longer be opened by participants, not even with their links. Answers, "
|
||||
"export and settings remain available here; a form can be taken out of the archive at any time."
|
||||
msgstr ""
|
||||
"Archivierte Formulare können Teilnehmende nicht mehr öffnen, auch nicht mit ihren Links. "
|
||||
"Antworten, Export und Einstellungen bleiben hier verfügbar; ein Formular lässt sich jederzeit aus"
|
||||
" dem Archiv holen."
|
||||
|
||||
#: surveybox/web/templates/forms_list.html
|
||||
msgid "Trash"
|
||||
msgstr "Papierkorb"
|
||||
@@ -5656,10 +5802,6 @@ msgstr ""
|
||||
" mit Plätzen, erhaltene Folge-Mails und das E-Mail-Protokoll. Es ist eine JSON-Datei, die andere "
|
||||
"Programme lesen können."
|
||||
|
||||
#: surveybox/web/templates/guest_links.html
|
||||
msgid "Request my links"
|
||||
msgstr "Meine Links anfordern"
|
||||
|
||||
#: surveybox/web/templates/guest_links.html
|
||||
msgid ""
|
||||
"If we have answers for this address, we have sent all personal links to it. Links sent earlier no"
|
||||
@@ -5897,16 +6039,6 @@ msgstr "Ihre Antwort wurde gelöscht."
|
||||
msgid "Your notification setting has been saved."
|
||||
msgstr "Ihre Einstellung für Benachrichtigungen wurde gespeichert."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Your answer from %(date)s."
|
||||
msgstr "Ihre Antwort vom %(date)s."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Last changed %(date)s."
|
||||
msgstr "Zuletzt geändert am %(date)s."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "You are on the waiting list for “%(entry)s”. If a place becomes free, you move up automatically."
|
||||
@@ -6188,6 +6320,16 @@ msgstr "Ja / Vielleicht / Nein"
|
||||
msgid "Participants may propose further options"
|
||||
msgstr "Teilnehmende dürfen weitere Optionen vorschlagen"
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid ""
|
||||
"A proposal counts as a “yes” from the person who made it. Everyone who has already taken part "
|
||||
"gets an email about it so they can add to their answer, provided participants may change their "
|
||||
"answer."
|
||||
msgstr ""
|
||||
"Ein Vorschlag zählt als „Ja“ der vorschlagenden Person. Alle, die schon teilgenommen haben, "
|
||||
"bekommen dazu eine Mail, um ihre Antwort zu ergänzen, sofern Teilnehmende ihre Antwort ändern "
|
||||
"dürfen."
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid ""
|
||||
"Only used when the options are dates. Time and duration are optional; without a time the date "
|
||||
@@ -6195,8 +6337,8 @@ msgid ""
|
||||
msgstr "Nur für Termin-Optionen. Uhrzeit und Dauer sind optional; ohne Uhrzeit gilt der ganze Tag."
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid "Minutes"
|
||||
msgstr "Minuten"
|
||||
msgid "Duration (min.)"
|
||||
msgstr "Dauer (Min.)"
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid "Note"
|
||||
@@ -6738,6 +6880,28 @@ msgid_plural "The following dates have been confirmed in “%(title)s”:"
|
||||
msgstr[0] "in „%(title)s“ wurde folgender Termin bestätigt:"
|
||||
msgstr[1] "in „%(title)s“ wurden folgende Termine bestätigt:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your vote and the result:"
|
||||
msgstr "Ihre Stimme und das Ergebnis:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your vote:"
|
||||
msgstr "Ihre Stimme:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
#, python-format
|
||||
msgid "all votes: %(yes)s yes, %(maybe)s maybe, %(no)s no"
|
||||
msgstr "insgesamt: %(yes)s Ja, %(maybe)s Vielleicht, %(no)s Nein"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
#, python-format
|
||||
msgid "all votes: %(yes)s yes, %(no)s no"
|
||||
msgstr "insgesamt: %(yes)s Ja, %(no)s Nein"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your answer and the confirmed dates, also after the end of the form:"
|
||||
msgstr "Ihre Antwort und die festgelegten Termine, auch nach dem Ende des Formulars:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Calendar file with the confirmed dates:"
|
||||
msgstr "Kalenderdatei mit den bestätigten Terminen:"
|
||||
@@ -6984,6 +7148,33 @@ msgstr ""
|
||||
"Wenn Sie nicht mehr kommen können, ändern Sie bitte Ihre Antwort, damit die nächste Person "
|
||||
"nachrücken kann:"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
#, python-format
|
||||
msgid "New proposal: %(title)s"
|
||||
msgstr "Neuer Vorschlag: %(title)s"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
#, python-format
|
||||
msgid "A participant has proposed a further option in “%(title)s”:"
|
||||
msgid_plural "Participants have proposed further options in “%(title)s”:"
|
||||
msgstr[0] "Eine teilnehmende Person hat in „%(title)s“ eine weitere Option vorgeschlagen:"
|
||||
msgstr[1] "Teilnehmende haben in „%(title)s“ weitere Optionen vorgeschlagen:"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
msgid ""
|
||||
"You have already taken part. If you like, add your vote for the new option to your answer: open "
|
||||
"your personal link from your confirmation email. You can request it again here:"
|
||||
msgstr ""
|
||||
"Sie haben schon teilgenommen. Wenn Sie möchten, ergänzen Sie Ihre Antwort um Ihre Stimme zum "
|
||||
"neuen Vorschlag: Öffnen Sie dazu Ihren persönlichen Link aus der Eingangsbestätigung. Sie können "
|
||||
"ihn hier erneut anfordern:"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
msgid "You have already taken part. If you like, add your vote for the new option to your answer:"
|
||||
msgstr ""
|
||||
"Sie haben schon teilgenommen. Wenn Sie möchten, ergänzen Sie Ihre Antwort um Ihre Stimme zum "
|
||||
"neuen Vorschlag:"
|
||||
|
||||
#: surveybox/web/templates/mail/register.txt
|
||||
#, python-format
|
||||
msgid "Create your account at %(app)s"
|
||||
|
||||
@@ -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 10:29+0100\n"
|
||||
"POT-Creation-Date: 2026-11-26 15:11+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -125,7 +125,8 @@ msgstr "Invalid rule (question missing or not earlier)"
|
||||
#: surveybox/forms/conditions.py surveybox/forms/evaluation.py surveybox/forms/export.py
|
||||
#: surveybox/forms/summary.py surveybox/forms/types.py surveybox/web/routes/forms.py
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/form_history_compare.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "Yes"
|
||||
msgstr "Yes"
|
||||
|
||||
@@ -133,7 +134,7 @@ msgstr "Yes"
|
||||
#: surveybox/forms/summary.py surveybox/forms/types.py surveybox/web/routes/forms.py
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/form_history_compare.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/form_settings.html
|
||||
#: surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/results_public.html
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
@@ -185,7 +186,8 @@ msgid "Email address"
|
||||
msgstr "Email address"
|
||||
|
||||
#: surveybox/forms/export.py surveybox/forms/types.py surveybox/web/templates/_fill_fields.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "Maybe"
|
||||
msgstr "Maybe"
|
||||
|
||||
@@ -586,6 +588,10 @@ msgstr "Moved up from the waiting list"
|
||||
msgid "Date confirmed in a poll"
|
||||
msgstr "Date confirmed in a poll"
|
||||
|
||||
#: surveybox/mail/custom.py
|
||||
msgid "New option proposed in a poll"
|
||||
msgstr "New option proposed in a poll"
|
||||
|
||||
#: surveybox/mail/custom.py
|
||||
msgid "Chosen entry or date removed"
|
||||
msgstr "Chosen entry or date removed"
|
||||
@@ -710,9 +716,10 @@ msgstr "The text must contain {details} or these placeholders: %(names)s"
|
||||
#: 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
|
||||
#: surveybox/web/templates/mail/proposed.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,"
|
||||
@@ -725,9 +732,10 @@ msgstr "Hello %(name)s,"
|
||||
#: 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
|
||||
#: surveybox/web/templates/mail/proposed.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,"
|
||||
|
||||
@@ -755,6 +763,10 @@ msgstr "Follow-up emails with documents from forms I took part in"
|
||||
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 "Someone has proposed a new option in a poll I took part in"
|
||||
msgstr "Someone has proposed a new option in a poll I took part in"
|
||||
|
||||
#: surveybox/mail/notify.py
|
||||
msgid "Reminder about a form I was invited to"
|
||||
msgstr "Reminder about a form I was invited to"
|
||||
@@ -1119,6 +1131,14 @@ msgstr "Form deleted"
|
||||
msgid "Form status changed"
|
||||
msgstr "Form status changed"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form archived"
|
||||
msgstr "Form archived"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form taken out of the archive"
|
||||
msgstr "Form taken out of the archive"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form copied"
|
||||
msgstr "Form copied"
|
||||
@@ -1760,6 +1780,14 @@ msgstr "Unknown status."
|
||||
msgid "Add at least one question before opening the form."
|
||||
msgstr "Add at least one question before opening the form."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "The form is archived. Take it out of the archive first."
|
||||
msgstr "The form is archived. Take it out of the archive first."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Only completed forms can be archived. Complete the form first."
|
||||
msgstr "Only completed forms can be archived. Complete the form first."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Unknown question type."
|
||||
msgstr "Unknown question type."
|
||||
@@ -1873,8 +1901,12 @@ msgid "Open"
|
||||
msgstr "Open"
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Closed"
|
||||
msgstr "Closed"
|
||||
msgid "Completed"
|
||||
msgstr "Completed"
|
||||
|
||||
#: surveybox/web/routes/forms.py surveybox/web/templates/forms_list.html
|
||||
msgid "Archived"
|
||||
msgstr "Archived"
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "All signed-in users"
|
||||
@@ -2008,6 +2040,18 @@ msgstr "There already is an account with this address. Please sign in."
|
||||
msgid "Registration is switched off."
|
||||
msgstr "Registration is switched off."
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html
|
||||
msgid "Decided"
|
||||
msgstr "Decided"
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html
|
||||
msgid "Add confirmed dates to my calendar"
|
||||
msgstr "Add confirmed dates to my calendar"
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Subscription link for calendar programs (stays up to date if dates change):"
|
||||
msgstr "Subscription link for calendar programs (stays up to date if dates change):"
|
||||
|
||||
#: surveybox/web/templates/_comments.html
|
||||
msgid "edited"
|
||||
msgstr "edited"
|
||||
@@ -2197,7 +2241,8 @@ msgstr[1] "%(num)d places left"
|
||||
msgid "proposed"
|
||||
msgstr "proposed"
|
||||
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "confirmed"
|
||||
msgstr "confirmed"
|
||||
|
||||
@@ -3811,6 +3856,18 @@ msgstr "Not found"
|
||||
msgid "This page does not exist."
|
||||
msgstr "This page does not exist."
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "This form has been archived and can no longer be opened."
|
||||
msgstr "This form has been archived and can no longer be opened."
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "If you took part as a guest, you can still download or delete your data under “Request my links”."
|
||||
msgstr "If you took part as a guest, you can still download or delete your data under “Request my links”."
|
||||
|
||||
#: surveybox/web/templates/error.html surveybox/web/templates/guest_links.html
|
||||
msgid "Request my links"
|
||||
msgstr "Request my links"
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "Request rejected"
|
||||
msgstr "Request rejected"
|
||||
@@ -3869,6 +3926,18 @@ msgstr ""
|
||||
"For the entries, everyone who opens this form sees who has already signed up, with first and last"
|
||||
" name."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid ""
|
||||
"In the results, participants see how each person voted in polls: first name and the initial of "
|
||||
"the last name."
|
||||
msgstr ""
|
||||
"In the results, participants see how each person voted in polls: first name and the initial of "
|
||||
"the last name."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid "In the results, participants see how each person voted in polls, with first and last name."
|
||||
msgstr "In the results, participants see how each person voted in polls, with first and last name."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid "Please check the marked questions."
|
||||
msgstr "Please check the marked questions."
|
||||
@@ -3958,8 +4027,22 @@ msgid "This form opens on %(date)s."
|
||||
msgstr "This form opens on %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html
|
||||
msgid "This form is closed. Answers can no longer be submitted."
|
||||
msgstr "This form is closed. Answers can no longer be submitted."
|
||||
msgid "This form is completed. Answers can no longer be submitted."
|
||||
msgstr "This form is completed. Answers can no longer be submitted."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html
|
||||
msgid "Your answer"
|
||||
msgstr "Your answer"
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Your answer from %(date)s."
|
||||
msgstr "Your answer from %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Last changed %(date)s."
|
||||
msgstr "Last changed %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "You have already filled in this form."
|
||||
@@ -4022,10 +4105,6 @@ msgstr "Change my answers"
|
||||
msgid "Documents"
|
||||
msgstr "Documents"
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "Add confirmed dates to my calendar"
|
||||
msgstr "Add confirmed dates to my calendar"
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "Fill in again"
|
||||
msgstr "Fill in again"
|
||||
@@ -4362,6 +4441,23 @@ msgstr "All forms"
|
||||
msgid "Template"
|
||||
msgstr "Template"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
#, python-format
|
||||
msgid ""
|
||||
"This form is archived since %(date)s. Participants can no longer open it, not even with their "
|
||||
"links. Answers and export remain available."
|
||||
msgstr ""
|
||||
"This form is archived since %(date)s. Participants can no longer open it, not even with their "
|
||||
"links. Answers and export remain available."
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid ""
|
||||
"Completed: no further answers. Participants can still open the form and see their own answer, "
|
||||
"confirmed dates and, if released, the results. Archive the form to make it unavailable to them."
|
||||
msgstr ""
|
||||
"Completed: no further answers. Participants can still open the form and see their own answer, "
|
||||
"confirmed dates and, if released, the results. Archive the form to make it unavailable to them."
|
||||
|
||||
#: surveybox/web/templates/form_designer.html surveybox/web/templates/form_history.html
|
||||
msgid "More places are booked than available:"
|
||||
msgstr "More places are booked than available:"
|
||||
@@ -4406,18 +4502,30 @@ msgstr "Save as template"
|
||||
msgid "Available to all creators"
|
||||
msgstr "Available to all creators"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Take out of the archive"
|
||||
msgstr "Take out of the archive"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Publish"
|
||||
msgstr "Publish"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Close"
|
||||
msgstr "Close"
|
||||
msgid "Release the results to participants"
|
||||
msgstr "Release the results to participants"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Complete"
|
||||
msgstr "Complete"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Reopen"
|
||||
msgstr "Reopen"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html surveybox/web/templates/forms_list.html
|
||||
msgid "Archive"
|
||||
msgstr "Archive"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Opens"
|
||||
msgstr "Opens"
|
||||
@@ -5270,6 +5378,30 @@ msgstr ""
|
||||
"them anyway. Guests without an account see the results for a week after taking part, or with "
|
||||
"their personal link. With very few answers, results can reveal how individuals answered."
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Polls in the results"
|
||||
msgstr "Polls in the results"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Only the number of answers per option"
|
||||
msgstr "Only the number of answers per option"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "With names: first name and initial of the last name"
|
||||
msgstr "With names: first name and initial of the last name"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "With names: first and last name"
|
||||
msgstr "With names: first and last name"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid ""
|
||||
"Applies when participants see the results: with names, everyone can see who voted how. The form "
|
||||
"tells participants about it before they vote. Not for anonymous forms."
|
||||
msgstr ""
|
||||
"Applies when participants see the results: with names, everyone can see who voted how. The form "
|
||||
"tells participants about it before they vote. Not for anonymous forms."
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Places, calendar and comments"
|
||||
msgstr "Places, calendar and comments"
|
||||
@@ -5466,6 +5598,14 @@ msgstr "Co-editor"
|
||||
msgid "No forms yet."
|
||||
msgstr "No forms yet."
|
||||
|
||||
#: surveybox/web/templates/forms_list.html
|
||||
msgid ""
|
||||
"Archived forms can no longer be opened by participants, not even with their links. Answers, "
|
||||
"export and settings remain available here; a form can be taken out of the archive at any time."
|
||||
msgstr ""
|
||||
"Archived forms can no longer be opened by participants, not even with their links. Answers, "
|
||||
"export and settings remain available here; a form can be taken out of the archive at any time."
|
||||
|
||||
#: surveybox/web/templates/forms_list.html
|
||||
msgid "Trash"
|
||||
msgstr "Trash"
|
||||
@@ -5604,10 +5744,6 @@ msgstr ""
|
||||
"places, follow-up emails received and the email log. It is a JSON file that other programs can "
|
||||
"read."
|
||||
|
||||
#: surveybox/web/templates/guest_links.html
|
||||
msgid "Request my links"
|
||||
msgstr "Request my links"
|
||||
|
||||
#: surveybox/web/templates/guest_links.html
|
||||
msgid ""
|
||||
"If we have answers for this address, we have sent all personal links to it. Links sent earlier no"
|
||||
@@ -5836,16 +5972,6 @@ msgstr "Your answer has been deleted."
|
||||
msgid "Your notification setting has been saved."
|
||||
msgstr "Your notification setting has been saved."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Your answer from %(date)s."
|
||||
msgstr "Your answer from %(date)s."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Last changed %(date)s."
|
||||
msgstr "Last changed %(date)s."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "You are on the waiting list for “%(entry)s”. If a place becomes free, you move up automatically."
|
||||
@@ -6122,6 +6248,16 @@ msgstr "Yes / Maybe / No"
|
||||
msgid "Participants may propose further options"
|
||||
msgstr "Participants may propose further options"
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid ""
|
||||
"A proposal counts as a “yes” from the person who made it. Everyone who has already taken part "
|
||||
"gets an email about it so they can add to their answer, provided participants may change their "
|
||||
"answer."
|
||||
msgstr ""
|
||||
"A proposal counts as a “yes” from the person who made it. Everyone who has already taken part "
|
||||
"gets an email about it so they can add to their answer, provided participants may change their "
|
||||
"answer."
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid ""
|
||||
"Only used when the options are dates. Time and duration are optional; without a time the date "
|
||||
@@ -6131,8 +6267,8 @@ msgstr ""
|
||||
"counts as a whole day."
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid "Minutes"
|
||||
msgstr "Minutes"
|
||||
msgid "Duration (min.)"
|
||||
msgstr "Duration (min.)"
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid "Note"
|
||||
@@ -6666,6 +6802,28 @@ msgid_plural "The following dates have been confirmed in “%(title)s”:"
|
||||
msgstr[0] "The following date has been confirmed in “%(title)s”:"
|
||||
msgstr[1] "The following dates have been confirmed in “%(title)s”:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your vote and the result:"
|
||||
msgstr "Your vote and the result:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your vote:"
|
||||
msgstr "Your vote:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
#, python-format
|
||||
msgid "all votes: %(yes)s yes, %(maybe)s maybe, %(no)s no"
|
||||
msgstr "all votes: %(yes)s yes, %(maybe)s maybe, %(no)s no"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
#, python-format
|
||||
msgid "all votes: %(yes)s yes, %(no)s no"
|
||||
msgstr "all votes: %(yes)s yes, %(no)s no"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your answer and the confirmed dates, also after the end of the form:"
|
||||
msgstr "Your answer and the confirmed dates, also after the end of the form:"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Calendar file with the confirmed dates:"
|
||||
msgstr "Calendar file with the confirmed dates:"
|
||||
@@ -6904,6 +7062,30 @@ msgstr ""
|
||||
msgid "If you can no longer come, please change your answer so that the next person can move up:"
|
||||
msgstr "If you can no longer come, please change your answer so that the next person can move up:"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
#, python-format
|
||||
msgid "New proposal: %(title)s"
|
||||
msgstr "New proposal: %(title)s"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
#, python-format
|
||||
msgid "A participant has proposed a further option in “%(title)s”:"
|
||||
msgid_plural "Participants have proposed further options in “%(title)s”:"
|
||||
msgstr[0] "A participant has proposed a further option in “%(title)s”:"
|
||||
msgstr[1] "Participants have proposed further options in “%(title)s”:"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
msgid ""
|
||||
"You have already taken part. If you like, add your vote for the new option to your answer: open "
|
||||
"your personal link from your confirmation email. You can request it again here:"
|
||||
msgstr ""
|
||||
"You have already taken part. If you like, add your vote for the new option to your answer: open "
|
||||
"your personal link from your confirmation email. You can request it again here:"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
msgid "You have already taken part. If you like, add your vote for the new option to your answer:"
|
||||
msgstr "You have already taken part. If you like, add your vote for the new option to your answer:"
|
||||
|
||||
#: surveybox/web/templates/mail/register.txt
|
||||
#, python-format
|
||||
msgid "Create your account at %(app)s"
|
||||
|
||||
@@ -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 10:29+0100\n"
|
||||
"POT-Creation-Date: 2026-11-26 15:11+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: fr\n"
|
||||
@@ -125,7 +125,8 @@ msgstr "Règle invalide (question absente ou pas avant)"
|
||||
#: surveybox/forms/conditions.py surveybox/forms/evaluation.py surveybox/forms/export.py
|
||||
#: surveybox/forms/summary.py surveybox/forms/types.py surveybox/web/routes/forms.py
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/form_history_compare.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
@@ -133,7 +134,7 @@ msgstr "Oui"
|
||||
#: surveybox/forms/summary.py surveybox/forms/types.py surveybox/web/routes/forms.py
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/form_history_compare.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/form_settings.html
|
||||
#: surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/mail/confirmed.txt surveybox/web/templates/results_public.html
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
@@ -185,7 +186,8 @@ msgid "Email address"
|
||||
msgstr "Adresse e-mail"
|
||||
|
||||
#: surveybox/forms/export.py surveybox/forms/types.py surveybox/web/templates/_fill_fields.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/form_responses.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "Maybe"
|
||||
msgstr "Peut-être"
|
||||
|
||||
@@ -586,6 +588,10 @@ msgstr "Passé de la liste d’attente"
|
||||
msgid "Date confirmed in a poll"
|
||||
msgstr "Date confirmée dans un sondage"
|
||||
|
||||
#: surveybox/mail/custom.py
|
||||
msgid "New option proposed in a poll"
|
||||
msgstr "Nouvelle option proposée dans un sondage"
|
||||
|
||||
#: surveybox/mail/custom.py
|
||||
msgid "Chosen entry or date removed"
|
||||
msgstr "Entrée ou date choisie supprimée"
|
||||
@@ -710,9 +716,10 @@ msgstr "Le texte doit contenir {details} ou ces espaces réservés : %(names)s"
|
||||
#: 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
|
||||
#: surveybox/web/templates/mail/proposed.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,"
|
||||
@@ -725,9 +732,10 @@ msgstr "Bonjour %(name)s,"
|
||||
#: 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
|
||||
#: surveybox/web/templates/mail/proposed.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,"
|
||||
|
||||
@@ -755,6 +763,10 @@ msgstr "E-mails de suivi avec documents des formulaires auxquels j’ai particip
|
||||
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 "Someone has proposed a new option in a poll I took part in"
|
||||
msgstr "Une nouvelle option a été proposée dans un sondage auquel j’ai participé"
|
||||
|
||||
#: surveybox/mail/notify.py
|
||||
msgid "Reminder about a form I was invited to"
|
||||
msgstr "Rappel concernant un formulaire auquel j’ai été invité"
|
||||
@@ -1119,6 +1131,14 @@ msgstr "Formulaire supprimé"
|
||||
msgid "Form status changed"
|
||||
msgstr "Statut du formulaire modifié"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form archived"
|
||||
msgstr "Formulaire archivé"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form taken out of the archive"
|
||||
msgstr "Formulaire sorti des archives"
|
||||
|
||||
#: surveybox/web/routes/admin.py
|
||||
msgid "Form copied"
|
||||
msgstr "Formulaire copié"
|
||||
@@ -1760,6 +1780,14 @@ msgstr "Statut inconnu."
|
||||
msgid "Add at least one question before opening the form."
|
||||
msgstr "Ajoutez au moins une question avant d’ouvrir le formulaire."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "The form is archived. Take it out of the archive first."
|
||||
msgstr "Le formulaire est archivé. Sortez-le d’abord des archives."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Only completed forms can be archived. Complete the form first."
|
||||
msgstr "Seuls les formulaires clôturés peuvent être archivés. Clôturez d’abord le formulaire."
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Unknown question type."
|
||||
msgstr "Type de question inconnu."
|
||||
@@ -1875,8 +1903,12 @@ msgid "Open"
|
||||
msgstr "Ouvert"
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "Closed"
|
||||
msgstr "Fermé"
|
||||
msgid "Completed"
|
||||
msgstr "Clôturé"
|
||||
|
||||
#: surveybox/web/routes/forms.py surveybox/web/templates/forms_list.html
|
||||
msgid "Archived"
|
||||
msgstr "Archivé"
|
||||
|
||||
#: surveybox/web/routes/forms.py
|
||||
msgid "All signed-in users"
|
||||
@@ -2010,6 +2042,18 @@ msgstr "Un compte existe déjà pour cette adresse. Veuillez vous connecter."
|
||||
msgid "Registration is switched off."
|
||||
msgstr "L’inscription est désactivée."
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html
|
||||
msgid "Decided"
|
||||
msgstr "Retenu"
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html
|
||||
msgid "Add confirmed dates to my calendar"
|
||||
msgstr "Ajouter les dates confirmées à mon agenda"
|
||||
|
||||
#: surveybox/web/templates/_calendar_links.html surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Subscription link for calendar programs (stays up to date if dates change):"
|
||||
msgstr "Lien d’abonnement pour les agendas (reste à jour si les dates changent) :"
|
||||
|
||||
#: surveybox/web/templates/_comments.html
|
||||
msgid "edited"
|
||||
msgstr "modifié"
|
||||
@@ -2201,7 +2245,8 @@ msgstr[1] "encore %(num)d places"
|
||||
msgid "proposed"
|
||||
msgstr "proposé"
|
||||
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/results_public.html
|
||||
#: surveybox/web/templates/_fill_fields.html surveybox/web/templates/mail/confirmed.txt
|
||||
#: surveybox/web/templates/results_public.html
|
||||
msgid "confirmed"
|
||||
msgstr "confirmé"
|
||||
|
||||
@@ -3847,6 +3892,20 @@ msgstr "Introuvable"
|
||||
msgid "This page does not exist."
|
||||
msgstr "Cette page n’existe pas."
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "This form has been archived and can no longer be opened."
|
||||
msgstr "Ce formulaire a été archivé et ne peut plus être ouvert."
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "If you took part as a guest, you can still download or delete your data under “Request my links”."
|
||||
msgstr ""
|
||||
"Si vous avez participé en tant qu’invité, vous pouvez toujours télécharger ou supprimer vos "
|
||||
"données sous « Demander mes liens »."
|
||||
|
||||
#: surveybox/web/templates/error.html surveybox/web/templates/guest_links.html
|
||||
msgid "Request my links"
|
||||
msgstr "Demander mes liens"
|
||||
|
||||
#: surveybox/web/templates/error.html
|
||||
msgid "Request rejected"
|
||||
msgstr "Requête refusée"
|
||||
@@ -3905,6 +3964,20 @@ msgstr ""
|
||||
"Pour les inscriptions, toute personne qui ouvre ce formulaire voit qui s’est déjà inscrit, avec "
|
||||
"prénom et nom."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid ""
|
||||
"In the results, participants see how each person voted in polls: first name and the initial of "
|
||||
"the last name."
|
||||
msgstr ""
|
||||
"Dans les résultats, les participants voient comment chaque personne a voté aux sondages : prénom "
|
||||
"et initiale du nom."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid "In the results, participants see how each person voted in polls, with first and last name."
|
||||
msgstr ""
|
||||
"Dans les résultats, les participants voient comment chaque personne a voté aux sondages, avec "
|
||||
"prénom et nom."
|
||||
|
||||
#: surveybox/web/templates/fill.html
|
||||
msgid "Please check the marked questions."
|
||||
msgstr "Veuillez vérifier les questions signalées."
|
||||
@@ -3996,8 +4069,22 @@ msgid "This form opens on %(date)s."
|
||||
msgstr "Ce formulaire ouvre le %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html
|
||||
msgid "This form is closed. Answers can no longer be submitted."
|
||||
msgstr "Ce formulaire est fermé. Il n’est plus possible d’envoyer des réponses."
|
||||
msgid "This form is completed. Answers can no longer be submitted."
|
||||
msgstr "Ce formulaire est clôturé. Il n’est plus possible de répondre."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html
|
||||
msgid "Your answer"
|
||||
msgstr "Votre réponse"
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Your answer from %(date)s."
|
||||
msgstr "Votre réponse du %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_closed.html surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Last changed %(date)s."
|
||||
msgstr "Dernière modification le %(date)s."
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "You have already filled in this form."
|
||||
@@ -4060,10 +4147,6 @@ msgstr "Modifier mes réponses"
|
||||
msgid "Documents"
|
||||
msgstr "Documents"
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "Add confirmed dates to my calendar"
|
||||
msgstr "Ajouter les dates confirmées à mon agenda"
|
||||
|
||||
#: surveybox/web/templates/fill_done.html
|
||||
msgid "Fill in again"
|
||||
msgstr "Remplir à nouveau"
|
||||
@@ -4409,6 +4492,24 @@ msgstr "Tous les formulaires"
|
||||
msgid "Template"
|
||||
msgstr "Modèle"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
#, python-format
|
||||
msgid ""
|
||||
"This form is archived since %(date)s. Participants can no longer open it, not even with their "
|
||||
"links. Answers and export remain available."
|
||||
msgstr ""
|
||||
"Ce formulaire est archivé depuis le %(date)s. Les participants ne peuvent plus l’ouvrir, même "
|
||||
"avec leurs liens. Les réponses et l’export restent disponibles."
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid ""
|
||||
"Completed: no further answers. Participants can still open the form and see their own answer, "
|
||||
"confirmed dates and, if released, the results. Archive the form to make it unavailable to them."
|
||||
msgstr ""
|
||||
"Clôturé : plus de nouvelles réponses. Les participants peuvent encore ouvrir le formulaire et "
|
||||
"voir leur propre réponse, les dates retenues et, si elles sont publiées, les résultats. Archivez "
|
||||
"le formulaire pour qu’il ne leur soit plus accessible."
|
||||
|
||||
#: surveybox/web/templates/form_designer.html surveybox/web/templates/form_history.html
|
||||
msgid "More places are booked than available:"
|
||||
msgstr "Plus de places sont réservées que disponibles :"
|
||||
@@ -4453,18 +4554,30 @@ msgstr "Enregistrer comme modèle"
|
||||
msgid "Available to all creators"
|
||||
msgstr "Disponible pour tous les créateurs"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Take out of the archive"
|
||||
msgstr "Sortir des archives"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Publish"
|
||||
msgstr "Publier"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Close"
|
||||
msgstr "Fermer"
|
||||
msgid "Release the results to participants"
|
||||
msgstr "Publier les résultats aux participants"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Complete"
|
||||
msgstr "Clôturer"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Reopen"
|
||||
msgstr "Rouvrir"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html surveybox/web/templates/forms_list.html
|
||||
msgid "Archive"
|
||||
msgstr "Archiver"
|
||||
|
||||
#: surveybox/web/templates/form_designer.html
|
||||
msgid "Opens"
|
||||
msgstr "Ouverture"
|
||||
@@ -5330,6 +5443,30 @@ msgstr ""
|
||||
"personnel. Avec très peu de réponses, les résultats peuvent révéler les réponses de certaines "
|
||||
"personnes."
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Polls in the results"
|
||||
msgstr "Sondages dans les résultats"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Only the number of answers per option"
|
||||
msgstr "Seulement le nombre de réponses par option"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "With names: first name and initial of the last name"
|
||||
msgstr "Avec les noms : prénom et initiale du nom"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "With names: first and last name"
|
||||
msgstr "Avec les noms : prénom et nom"
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid ""
|
||||
"Applies when participants see the results: with names, everyone can see who voted how. The form "
|
||||
"tells participants about it before they vote. Not for anonymous forms."
|
||||
msgstr ""
|
||||
"S’applique lorsque les participants voient les résultats : avec les noms, chacun voit qui a voté "
|
||||
"quoi. Le formulaire l’indique avant le vote. Pas pour les formulaires anonymes."
|
||||
|
||||
#: surveybox/web/templates/form_settings.html
|
||||
msgid "Places, calendar and comments"
|
||||
msgstr "Places, agenda et commentaires"
|
||||
@@ -5530,6 +5667,15 @@ msgstr "Coéditeur"
|
||||
msgid "No forms yet."
|
||||
msgstr "Pas encore de formulaires."
|
||||
|
||||
#: surveybox/web/templates/forms_list.html
|
||||
msgid ""
|
||||
"Archived forms can no longer be opened by participants, not even with their links. Answers, "
|
||||
"export and settings remain available here; a form can be taken out of the archive at any time."
|
||||
msgstr ""
|
||||
"Les participants ne peuvent plus ouvrir les formulaires archivés, même avec leurs liens. Les "
|
||||
"réponses, l’export et les paramètres restent disponibles ici ; un formulaire peut être sorti des "
|
||||
"archives à tout moment."
|
||||
|
||||
#: surveybox/web/templates/forms_list.html
|
||||
msgid "Trash"
|
||||
msgstr "Corbeille"
|
||||
@@ -5670,10 +5816,6 @@ msgstr ""
|
||||
"réponses avec les places, les e-mails de suivi reçus et le journal des e-mails. C’est un fichier "
|
||||
"JSON lisible par d’autres programmes."
|
||||
|
||||
#: surveybox/web/templates/guest_links.html
|
||||
msgid "Request my links"
|
||||
msgstr "Demander mes liens"
|
||||
|
||||
#: surveybox/web/templates/guest_links.html
|
||||
msgid ""
|
||||
"If we have answers for this address, we have sent all personal links to it. Links sent earlier no"
|
||||
@@ -5915,16 +6057,6 @@ msgstr "Votre réponse a été supprimée."
|
||||
msgid "Your notification setting has been saved."
|
||||
msgstr "Votre paramètre de notification a été enregistré."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Your answer from %(date)s."
|
||||
msgstr "Votre réponse du %(date)s."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "Last changed %(date)s."
|
||||
msgstr "Dernière modification le %(date)s."
|
||||
|
||||
#: surveybox/web/templates/personal.html
|
||||
#, python-format
|
||||
msgid "You are on the waiting list for “%(entry)s”. If a place becomes free, you move up automatically."
|
||||
@@ -6210,6 +6342,16 @@ msgstr "Oui / Peut-être / Non"
|
||||
msgid "Participants may propose further options"
|
||||
msgstr "Les participants peuvent proposer d’autres options"
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid ""
|
||||
"A proposal counts as a “yes” from the person who made it. Everyone who has already taken part "
|
||||
"gets an email about it so they can add to their answer, provided participants may change their "
|
||||
"answer."
|
||||
msgstr ""
|
||||
"Une proposition compte comme un « oui » de la personne qui l’a faite. Toutes les personnes ayant "
|
||||
"déjà participé reçoivent un e-mail pour compléter leur réponse, à condition que les participants "
|
||||
"puissent modifier leur réponse."
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid ""
|
||||
"Only used when the options are dates. Time and duration are optional; without a time the date "
|
||||
@@ -6219,8 +6361,8 @@ msgstr ""
|
||||
"compte pour toute la journée."
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid "Minutes"
|
||||
msgstr "Minutes"
|
||||
msgid "Duration (min.)"
|
||||
msgstr "Durée (min)"
|
||||
|
||||
#: surveybox/web/templates/question_edit.html
|
||||
msgid "Note"
|
||||
@@ -6768,6 +6910,28 @@ msgid_plural "The following dates have been confirmed in “%(title)s”:"
|
||||
msgstr[0] "la date suivante a été confirmée dans « %(title)s » :"
|
||||
msgstr[1] "les dates suivantes ont été confirmées dans « %(title)s » :"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your vote and the result:"
|
||||
msgstr "Votre vote et le résultat :"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your vote:"
|
||||
msgstr "Votre vote :"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
#, python-format
|
||||
msgid "all votes: %(yes)s yes, %(maybe)s maybe, %(no)s no"
|
||||
msgstr "au total : %(yes)s oui, %(maybe)s peut-être, %(no)s non"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
#, python-format
|
||||
msgid "all votes: %(yes)s yes, %(no)s no"
|
||||
msgstr "au total : %(yes)s oui, %(no)s non"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Your answer and the confirmed dates, also after the end of the form:"
|
||||
msgstr "Votre réponse et les dates retenues, même après la fin du formulaire :"
|
||||
|
||||
#: surveybox/web/templates/mail/confirmed.txt
|
||||
msgid "Calendar file with the confirmed dates:"
|
||||
msgstr "Fichier calendrier avec les dates confirmées :"
|
||||
@@ -7020,6 +7184,33 @@ msgstr ""
|
||||
"Si vous ne pouvez plus venir, modifiez votre réponse pour que la personne suivante puisse prendre"
|
||||
" la place :"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
#, python-format
|
||||
msgid "New proposal: %(title)s"
|
||||
msgstr "Nouvelle proposition : %(title)s"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
#, python-format
|
||||
msgid "A participant has proposed a further option in “%(title)s”:"
|
||||
msgid_plural "Participants have proposed further options in “%(title)s”:"
|
||||
msgstr[0] "Un participant a proposé une option supplémentaire dans « %(title)s » :"
|
||||
msgstr[1] "Des participants ont proposé des options supplémentaires dans « %(title)s » :"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
msgid ""
|
||||
"You have already taken part. If you like, add your vote for the new option to your answer: open "
|
||||
"your personal link from your confirmation email. You can request it again here:"
|
||||
msgstr ""
|
||||
"Vous avez déjà participé. Si vous le souhaitez, complétez votre réponse en votant pour la "
|
||||
"nouvelle option : ouvrez pour cela votre lien personnel figurant dans l’e-mail de confirmation. "
|
||||
"Vous pouvez le demander à nouveau ici :"
|
||||
|
||||
#: surveybox/web/templates/mail/proposed.txt
|
||||
msgid "You have already taken part. If you like, add your vote for the new option to your answer:"
|
||||
msgstr ""
|
||||
"Vous avez déjà participé. Si vous le souhaitez, complétez votre réponse en votant pour la "
|
||||
"nouvelle option :"
|
||||
|
||||
#: surveybox/web/templates/mail/register.txt
|
||||
#, python-format
|
||||
msgid "Create your account at %(app)s"
|
||||
|
||||
+631
-441
File diff suppressed because it is too large.
Load diff
@@ -46,6 +46,7 @@ KINDS: dict[str, str] = {
|
||||
"guest_export": N_("Guest: download own data"),
|
||||
"promoted": N_("Moved up from the waiting list"),
|
||||
"confirmed": N_("Date confirmed in a poll"),
|
||||
"proposed": N_("New option proposed in a poll"),
|
||||
"changed": N_("Chosen entry or date removed"),
|
||||
"invitation": N_("Invitation to a form"),
|
||||
"reminder": N_("Reminder to invited people"),
|
||||
|
||||
+150
-27
@@ -5,7 +5,8 @@ Jede Benachrichtigung gehört zu einem Ereignis. Empfänger schalten Ereignisse
|
||||
im Konto ab, bestellen sie für ein einzelnes Formular ab oder nutzen den
|
||||
Abmeldelink in der Mail (auch per Klick im Mailprogramm, RFC 8058).
|
||||
|
||||
Mails enthalten Links statt Antwortinhalten. Bei anonymen Formularen gibt es
|
||||
Mails enthalten Links statt Antwortinhalten; einzige Ausnahme ist die eigene Stimme
|
||||
der Person in der Mail zu einem festgelegten Termin. Bei anonymen Formularen gibt es
|
||||
keine Mails an Teilnehmende: Schon die Mail würde Person und Teilnahme
|
||||
verbinden.
|
||||
"""
|
||||
@@ -79,6 +80,8 @@ EVENTS: dict[str, Event] = {
|
||||
"participant"),
|
||||
"changed": Event(N_("An entry or date I chose has been removed from a form"),
|
||||
"participant"),
|
||||
"proposed": Event(N_("Someone has proposed a new option in a poll I took part in"),
|
||||
"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"),
|
||||
@@ -390,43 +393,163 @@ def promoted(db: Session, settings: Settings, question: Question, moved: Sequenc
|
||||
return count
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PollRecipient:
|
||||
"""Wer zu einer Abstimmung Mails bekommt, mit dem Link, der für diese Person taugt."""
|
||||
|
||||
recipient: Recipient
|
||||
response: Response
|
||||
link: str # Konto: Formular; eingeladener Gast: Einladungslink; sonst "Meine Links"
|
||||
unsubscribe_url: str | None = None # eingeladene Gäste: Abmelden von der Einladung
|
||||
event: str | None = None # None: Einladungs-Abmeldung statt Kontoeinstellung
|
||||
|
||||
|
||||
def poll_recipients(
|
||||
db: Session, settings: Settings, form: Form, event: str, exclude: Response | None = None,
|
||||
) -> list[PollRecipient]:
|
||||
"""Alle, die abgestimmt haben und deren Adresse bekannt ist: Konten, Gäste mit
|
||||
bestätigter Adresse und per E-Mail eingeladene Gäste (Adresse aus der Einladung).
|
||||
Ohne die Person hinter `exclude`; bei anonymen Formularen niemand."""
|
||||
if form.anonymous:
|
||||
return []
|
||||
from surveybox.forms import invitations as invites
|
||||
from surveybox.models import FormInvitation
|
||||
|
||||
by_response = {
|
||||
row.response_id: row for row in db.scalars(select(FormInvitation).where(
|
||||
FormInvitation.form_id == form.id, FormInvitation.response_id.is_not(None),
|
||||
FormInvitation.email.is_not(None)))
|
||||
}
|
||||
responses = db.scalars(
|
||||
select(Response).where(Response.form_id == form.id).order_by(Response.id)
|
||||
).all()
|
||||
skip: set[str] = set()
|
||||
if exclude is not None:
|
||||
me = _participant(db, settings, form, exclude)
|
||||
if me is not None:
|
||||
skip.add(me.email.lower())
|
||||
invited = by_response.get(exclude.id)
|
||||
if invited is not None and invited.email:
|
||||
skip.add(invited.email.lower())
|
||||
found: dict[str, PollRecipient] = {}
|
||||
for response in responses:
|
||||
if exclude is not None and response.id == exclude.id:
|
||||
continue
|
||||
candidate: PollRecipient | None = None
|
||||
if response.user_id is not None:
|
||||
user = db.get(UserAccount, response.user_id)
|
||||
if user is not None:
|
||||
candidate = PollRecipient(for_user(user, settings), response,
|
||||
form_link(settings, form), event=event)
|
||||
else:
|
||||
contact = (db.get(GuestContact, response.guest_contact_id)
|
||||
if response.guest_contact_id is not None else None)
|
||||
invitation = by_response.get(response.id)
|
||||
if contact is not None and not contact.notify and contact.confirmed_at is not None:
|
||||
continue # hat Benachrichtigungen abgeschaltet
|
||||
if invitation is not None and invitation.unsubscribed_at is None:
|
||||
candidate = PollRecipient(
|
||||
Recipient(invitation.email or "", "", settings.default_language),
|
||||
response, invites.link_url(settings, invitation),
|
||||
unsubscribe_url=invites.stop_url(settings, invitation))
|
||||
elif contact is not None and contact.confirmed_at is not None:
|
||||
candidate = PollRecipient(for_guest(contact, settings), response,
|
||||
f"{settings.public_origin}/links", event=event)
|
||||
if candidate is None or not candidate.recipient.email:
|
||||
continue
|
||||
key = candidate.recipient.email.lower()
|
||||
if key not in skip:
|
||||
found.setdefault(key, candidate)
|
||||
return [found[key] for key in sorted(found)]
|
||||
|
||||
|
||||
def _send_poll(db: Session, settings: Settings, form: Form, who: PollRecipient, *, kind: str,
|
||||
context: dict[str, Any], dedupe: str) -> bool:
|
||||
return send(
|
||||
db, settings, who.recipient, kind=kind, event=who.event, form=form,
|
||||
context={"link": who.link, **context},
|
||||
dedupe_key=f"{dedupe}:{who.recipient.email.lower()}",
|
||||
unsubscribe_url=who.unsubscribe_url,
|
||||
)
|
||||
|
||||
|
||||
def _votes(question: Question, response: Response) -> dict[str, str]:
|
||||
answer = next((a for a in response.answers if a.question_id == question.id), None)
|
||||
return dict(((answer.value_json if answer is not None else None) or {}).get("votes") or {})
|
||||
|
||||
|
||||
def dates_confirmed(
|
||||
db: Session, settings: Settings, form: Form, question: Question, new_ids: Sequence[str]
|
||||
) -> int:
|
||||
"""Neu bestätigte Termine einer Abstimmung an alle Teilnehmenden mit Konto."""
|
||||
"""Neu festgelegte Termine einer Abstimmung an alle, die abgestimmt haben: mit der
|
||||
eigenen Stimme und, wenn die Ergebnisse freigegeben sind, den Anzahlen je Option."""
|
||||
if form.anonymous or not new_ids:
|
||||
return 0
|
||||
from surveybox.forms import types
|
||||
from surveybox.forms import public_results, service, types
|
||||
|
||||
by_id = {o["id"]: o for o in types.options_of(question)}
|
||||
options = [by_id[i] for i in new_ids if i in by_id]
|
||||
if not options:
|
||||
return 0
|
||||
responses = db.scalars(
|
||||
select(Response).where(
|
||||
Response.form_id == form.id,
|
||||
(Response.user_id.is_not(None)) | (Response.guest_contact_id.is_not(None)),
|
||||
)
|
||||
).all()
|
||||
recipients: dict[str, Recipient] = {}
|
||||
for response in responses:
|
||||
found = _participant(db, settings, form, response)
|
||||
if found is not None:
|
||||
recipients.setdefault(found.ident, found)
|
||||
calendar = (
|
||||
f"{settings.public_origin}/f/{form.share_token}/calendar.ics"
|
||||
if form.calendar_mode != "off"
|
||||
else None
|
||||
)
|
||||
count = 0
|
||||
show_counts = public_results.visible(form, participated=True)
|
||||
counts: dict[str, dict[str, Any]] = {}
|
||||
if show_counts:
|
||||
for item in service.summary(db, form, None, settings.tz):
|
||||
if item.question.id == question.id:
|
||||
counts = {row["id"]: row for row in item.poll_rows}
|
||||
confirmed = set(question.config.get("confirmed") or [])
|
||||
feed = (f"{settings.public_origin}/calendar/{form.calendar_token}.ics"
|
||||
if form.calendar_mode == "feed" and form.calendar_token else "")
|
||||
key = ",".join(sorted(o["id"] for o in options))
|
||||
for ident in sorted(recipients):
|
||||
if send(
|
||||
db, settings, recipients[ident], kind="confirmed", event="confirmed", form=form,
|
||||
context={"options": options, "link": form_link(settings, form),
|
||||
"calendar": calendar},
|
||||
dedupe_key=f"confirmed:{question.id}:{key}:{ident}",
|
||||
):
|
||||
count = 0
|
||||
for who in poll_recipients(db, settings, form, "confirmed"):
|
||||
own = _votes(question, who.response)
|
||||
rows = [
|
||||
{"text": types.option_text(o), "vote": own.get(o["id"]) or "",
|
||||
"confirmed": o["id"] in confirmed, "counts": counts.get(o["id"])}
|
||||
for o in types.options_of(question)
|
||||
]
|
||||
calendar = ""
|
||||
if form.calendar_mode != "off" and (who.recipient.user is not None
|
||||
or form.access == "link"):
|
||||
calendar = f"{settings.public_origin}/f/{form.share_token}/calendar.ics"
|
||||
if _send_poll(db, settings, form, who, kind="confirmed",
|
||||
dedupe=f"confirmed:{question.id}:{key}",
|
||||
context={"options": options, "votes": rows, "show_counts": show_counts,
|
||||
"maybe": question.config.get("answers") == "ynm",
|
||||
"calendar": calendar, "feed": feed}):
|
||||
count += 1
|
||||
return count
|
||||
|
||||
|
||||
def options_proposed(
|
||||
db: Session, settings: Settings, form: Form, author: Response,
|
||||
proposed: Sequence[tuple[int, str]],
|
||||
) -> int:
|
||||
"""Neue Vorschläge aus der Teilnehmerschaft an alle, die schon abgestimmt haben, damit
|
||||
sie ihre Antwort ergänzen können. Nur, wenn sich Antworten noch ändern lassen; nie an
|
||||
die Person, die vorgeschlagen hat, und nie bei anonymen Formularen."""
|
||||
if not proposed or form.anonymous or form.allow_edit != "until_close":
|
||||
return 0
|
||||
from surveybox.forms import service, types
|
||||
|
||||
if service.fill_state(form) != service.FillState.OPEN:
|
||||
return 0
|
||||
questions = {q.id: q for q in form.questions}
|
||||
options: list[dict[str, Any]] = []
|
||||
for question_id, option_id in proposed:
|
||||
question = questions.get(question_id)
|
||||
found = next((o for o in types.options_of(question) if o.get("id") == option_id),
|
||||
None) if question is not None else None
|
||||
if found is not None:
|
||||
options.append(found)
|
||||
if not options:
|
||||
return 0
|
||||
key = ",".join(sorted(o["id"] for o in options))
|
||||
count = 0
|
||||
for who in poll_recipients(db, settings, form, "proposed", exclude=author):
|
||||
if _send_poll(db, settings, form, who, kind="proposed",
|
||||
dedupe=f"proposed:{form.id}:{key}", context={"options": options}):
|
||||
count += 1
|
||||
return count
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Formulare archivieren; Namen bei Abstimmungen in den Ergebnissen für Teilnehmende.
|
||||
|
||||
Revision: 0020_archive_poll_names
|
||||
Vorgänger: 0019_invitations
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0020_archive_poll_names"
|
||||
down_revision: str | None = "0019_invitations"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("form", sa.Column("archived_at", sa.DateTime(timezone=True), nullable=True))
|
||||
op.add_column("form", sa.Column("poll_names", sa.Text(), server_default=sa.text("'off'"),
|
||||
nullable=False))
|
||||
op.create_check_constraint(op.f("ck_form_poll_names_valid"), "form",
|
||||
"poll_names IN ('off', 'full', 'short')")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_constraint(op.f("ck_form_poll_names_valid"), "form", type_="check")
|
||||
op.drop_column("form", "poll_names")
|
||||
op.drop_column("form", "archived_at")
|
||||
@@ -71,6 +71,7 @@ class Form(Base):
|
||||
"comments_mode IN ('off', 'moderated', 'public')", name="comments_mode_valid"
|
||||
),
|
||||
CheckConstraint("slot_names IN ('off', 'full', 'short')", name="slot_names_valid"),
|
||||
CheckConstraint("poll_names IN ('off', 'full', 'short')", name="poll_names_valid"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
||||
@@ -93,6 +94,8 @@ class Form(Base):
|
||||
closes_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
# Von Hand geschlossen (Beginn der Löschfrist, wenn kein Enddatum gilt)
|
||||
closed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
# Archiviert: für Teilnehmende nicht mehr erreichbar, in der Formularliste im Archiv
|
||||
archived_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
# Hinweis an den Eigentümer, dass die Löschfrist bald abläuft
|
||||
retention_notified_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
|
||||
@@ -120,6 +123,9 @@ class Form(Base):
|
||||
consent_text: Mapped[str | None] = mapped_column(Text)
|
||||
# Namen der Eingetragenen bei Teilnahme-Feldern zeigen: aus, voll, Vorname + Initial
|
||||
slot_names: Mapped[str] = mapped_column(Text, nullable=False, server_default=text("'off'"))
|
||||
# Namen bei Abstimmungen in den Ergebnissen für Teilnehmende: aus (nur Anzahlen), voll,
|
||||
# Vorname + Initial
|
||||
poll_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)
|
||||
# Einladungen (siehe forms.invitations): Versand (leer: sobald das Formular offen ist),
|
||||
|
||||
+13
-1
@@ -19,7 +19,14 @@ from surveybox.security.headers import security_headers
|
||||
from surveybox.security.tokens import new_token
|
||||
from surveybox.settings import get_settings
|
||||
from surveybox.upgrade import head_revision
|
||||
from surveybox.web.deps import CsrfFailed, Forbidden, NotFound, RedirectTo, verify_csrf
|
||||
from surveybox.web.deps import (
|
||||
CsrfFailed,
|
||||
Forbidden,
|
||||
FormArchived,
|
||||
NotFound,
|
||||
RedirectTo,
|
||||
verify_csrf,
|
||||
)
|
||||
from surveybox.web.limits import MB, BodyLimit
|
||||
from surveybox.web.routes import (
|
||||
account,
|
||||
@@ -141,6 +148,11 @@ def create_app() -> FastAPI:
|
||||
async def _not_found(request: Request, _exc: NotFound) -> Response:
|
||||
return render(request, "error.html", {"code": 404}, status_code=404)
|
||||
|
||||
@app.exception_handler(FormArchived)
|
||||
async def _archived(request: Request, exc: FormArchived) -> Response:
|
||||
return render(request, "error.html", {"code": "archived", "title": exc.title},
|
||||
status_code=410)
|
||||
|
||||
@app.exception_handler(CsrfFailed)
|
||||
async def _csrf(request: Request, _exc: CsrfFailed) -> Response:
|
||||
return render(request, "error.html", {"code": "csrf"}, status_code=403)
|
||||
|
||||
@@ -45,6 +45,14 @@ class NotFound(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class FormArchived(Exception):
|
||||
"""Teilnehmerseite eines archivierten Formulars: nicht mehr abrufbar (410)."""
|
||||
|
||||
def __init__(self, title: str) -> None:
|
||||
super().__init__(title)
|
||||
self.title = title
|
||||
|
||||
|
||||
@dataclass
|
||||
class Auth:
|
||||
session: UserSession
|
||||
|
||||
@@ -79,6 +79,8 @@ ACTION_NAMES: dict[str, str] = {
|
||||
"form.created": N_("Form created"),
|
||||
"form.deleted": N_("Form deleted"),
|
||||
"form.status_changed": N_("Form status changed"),
|
||||
"form.archived": N_("Form archived"),
|
||||
"form.unarchived": N_("Form taken out of the archive"),
|
||||
"form.copied": N_("Form copied"),
|
||||
"form.team_changed": N_("Form team changed"),
|
||||
"admin.settings_changed": N_("Settings changed"),
|
||||
|
||||
@@ -35,6 +35,7 @@ def sample_context(settings: AppSettings) -> dict[str, Any]:
|
||||
"settings_url": f"{origin}/account/notifications", "guest": False, "can_edit": True,
|
||||
"edited": False, "pending": False, "mode": "anonymize", "calendar": "",
|
||||
"options": [], "items": [], "links": [], "documents": [],
|
||||
"votes": [], "show_counts": False, "maybe": False, "feed": "",
|
||||
"question": SimpleNamespace(label=i18n.gettext("Shift")),
|
||||
"invited_guest": False, "stop_link": f"{origin}/mail/invitation/beispiel",
|
||||
}
|
||||
|
||||
@@ -30,12 +30,14 @@ 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 FormInvitation, MediaKind
|
||||
from surveybox.models import Response as ResponseModel
|
||||
from surveybox.security.client_ip import ip_key
|
||||
from surveybox.security.tokens import new_token
|
||||
from surveybox.web.deps import (
|
||||
AppSettings,
|
||||
Db,
|
||||
Forbidden,
|
||||
FormArchived,
|
||||
FormFields,
|
||||
FormFiles,
|
||||
NotFound,
|
||||
@@ -65,6 +67,8 @@ def _load(db: Db, token: str) -> FormModel:
|
||||
form = service.find_by_token(db, token)
|
||||
if form is None:
|
||||
raise NotFound()
|
||||
if form.archived_at is not None:
|
||||
raise FormArchived(form.title)
|
||||
return form
|
||||
|
||||
|
||||
@@ -100,9 +104,19 @@ def _gate(
|
||||
raise NotFound()
|
||||
if state != FillState.OPEN:
|
||||
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})
|
||||
context: dict[str, Any] = {"form": form, "state": state, "results_url": None}
|
||||
if allowed and state == FillState.CLOSED:
|
||||
# Abgeschlossen: eigene Antwort, festgelegte Termine und (wenn freigegeben)
|
||||
# die Ergebnisse bleiben lesbar
|
||||
own = _own_response(request, db, settings, form, user)
|
||||
context.update(
|
||||
results_url=_results_url(request, db, settings, form, user),
|
||||
own=own,
|
||||
rows=service.display_rows(form, own, settings.tz) if own is not None else [],
|
||||
confirmed=service.confirmed_polls(form),
|
||||
**calendar_links(settings, form),
|
||||
)
|
||||
return render(request, "fill_closed.html", context)
|
||||
access = _access(request, db, settings, form, user)
|
||||
if access == FillAccess.LOGIN:
|
||||
raise RedirectTo(login_url(request))
|
||||
@@ -173,15 +187,39 @@ def _results_url(
|
||||
return None
|
||||
|
||||
|
||||
def calendar_links(settings: AppSettings, form: FormModel, base: str = "") -> dict[str, str]:
|
||||
"""Kalenderdatei und Abo-Link für Teilnehmende, sobald es festgelegte Termine gibt.
|
||||
`base`: eigener Pfad für die Datei (persönlicher Link), sonst der des Formulars."""
|
||||
if form.calendar_mode == "off" or not service.calendar_events(form):
|
||||
return {"calendar_url": "", "feed_url": ""}
|
||||
return {
|
||||
"calendar_url": f"{base or '/f/' + form.share_token}/calendar.ics",
|
||||
"feed_url": f"{settings.public_origin}/calendar/{form.calendar_token}.ics"
|
||||
if form.calendar_mode == "feed" and form.calendar_token else "",
|
||||
}
|
||||
|
||||
|
||||
def _own_response(
|
||||
request: Request, db: Db, settings: AppSettings, form: FormModel, user: Any
|
||||
) -> Any:
|
||||
"""Eigene Antwort: über das Konto oder (Gäste) über die Einladung im Cookie."""
|
||||
if form.anonymous:
|
||||
return None
|
||||
if user is not None:
|
||||
return service.own_response(db, form, user)
|
||||
invitation = _invitation(request, db, settings, form)
|
||||
if invitation is not None and invitation.response_id is not None:
|
||||
return db.get(ResponseModel, invitation.response_id)
|
||||
return None
|
||||
|
||||
|
||||
def _extras(
|
||||
request: Request, db: Db, settings: AppSettings, form: FormModel, user: Any
|
||||
) -> dict[str, Any]:
|
||||
"""Für die Seite nach der Teilnahme: Ergebnisse und Kalender, wenn freigegeben."""
|
||||
return {
|
||||
"results_url": _results_url(request, db, settings, form, user),
|
||||
"calendar_url": f"/f/{form.share_token}/calendar.ics"
|
||||
if form.calendar_mode != "off" and service.calendar_events(form)
|
||||
else "",
|
||||
**calendar_links(settings, form),
|
||||
}
|
||||
|
||||
|
||||
@@ -377,6 +415,7 @@ def submit_form(
|
||||
guests.confirm_url(settings, confirm) if confirm else None,
|
||||
)
|
||||
notify.safely(db, notify.booking_events, settings, form, events)
|
||||
notify.safely(db, notify.options_proposed, settings, form, response, validation.proposed)
|
||||
notify.safely(db, notify.participation_received, settings, form, response)
|
||||
notify.safely(db, followups.on_submit, settings, form, response)
|
||||
db.commit()
|
||||
@@ -595,6 +634,7 @@ def save_edit_for(
|
||||
)
|
||||
uploads.link(db, form, own, _visible_files(collected, validation))
|
||||
notify.safely(db, notify.booking_events, settings, form, events)
|
||||
notify.safely(db, notify.options_proposed, settings, form, own, validation.proposed)
|
||||
return None
|
||||
|
||||
|
||||
@@ -740,7 +780,8 @@ calendar_router = APIRouter(prefix="/calendar", include_in_schema=False)
|
||||
def calendar_feed(db: Db, settings: AppSettings, feed: str) -> Response:
|
||||
"""Abo-Link für Kalenderprogramme: ohne Anmeldung, nur über den geheimen Link."""
|
||||
form = service.find_by_calendar_token(db, feed)
|
||||
if form is None or form.calendar_mode != "feed" or form.status == "draft":
|
||||
if (form is None or form.calendar_mode != "feed" or form.status == "draft"
|
||||
or form.archived_at is not None):
|
||||
raise NotFound()
|
||||
return calendar_response(settings, form, download=False)
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ FORM_ERRORS: dict[str, str] = {
|
||||
"consent_text_missing": N_("Please enter the text the participants consent to."),
|
||||
"status_invalid": N_("Unknown status."),
|
||||
"no_questions": N_("Add at least one question before opening the form."),
|
||||
"archived": N_("The form is archived. Take it out of the archive first."),
|
||||
"archive_not_closed": N_("Only completed forms can be archived. Complete the form first."),
|
||||
"type_invalid": N_("Unknown question type."),
|
||||
"too_many_questions": N_("The form has reached the maximum number of questions."),
|
||||
"label_missing": N_("Please enter the question text."),
|
||||
@@ -101,7 +103,8 @@ STATUS_NAMES: dict[str, str] = {
|
||||
"draft": N_("Draft"),
|
||||
"scheduled": N_("Scheduled"),
|
||||
"open": N_("Open"),
|
||||
"closed": N_("Closed"),
|
||||
"closed": N_("Completed"),
|
||||
"archived": N_("Archived"),
|
||||
}
|
||||
|
||||
ACCESS_NAMES: dict[str, str] = {
|
||||
@@ -155,7 +158,7 @@ def _designer(
|
||||
{
|
||||
"form": form,
|
||||
"types": types.TYPES,
|
||||
"state": service.fill_state(form),
|
||||
"state": service.display_state(form),
|
||||
"status_names": STATUS_NAMES,
|
||||
"access_names": ACCESS_NAMES,
|
||||
"link": _link(settings, form),
|
||||
@@ -192,14 +195,16 @@ def _list_page(
|
||||
request: Request, db: Db, auth: Any, found: Any, **extra: Any
|
||||
) -> Response:
|
||||
status_code = int(extra.pop("status_code", 200))
|
||||
listed = team.list_forms(db, auth.user)
|
||||
return render(
|
||||
request,
|
||||
"forms_list.html",
|
||||
{
|
||||
"forms": team.list_forms(db, auth.user),
|
||||
"forms": [row for row in listed if row[0].archived_at is None],
|
||||
"archived": [row for row in listed if row[0].archived_at is not None],
|
||||
"templates": team.list_templates(db, auth.user) if found.can_create_forms else [],
|
||||
"status_names": STATUS_NAMES,
|
||||
"fill_state": service.fill_state,
|
||||
"fill_state": service.display_state,
|
||||
"can_create": found.can_create_forms,
|
||||
"group_choices": scope.creatable_groups(db, found),
|
||||
"group_required": not found.global_creator,
|
||||
@@ -260,12 +265,16 @@ def change_status(
|
||||
auth: CurrentUser,
|
||||
form: EditForm,
|
||||
status: Annotated[str, Form(max_length=20)],
|
||||
release_results: Annotated[str, Form(max_length=4)] = "",
|
||||
) -> Response:
|
||||
try:
|
||||
service.set_status(form, status)
|
||||
except FormError as exc:
|
||||
db.rollback()
|
||||
return _designer(request, db, settings, form, error=_error(exc.code), status_code=400)
|
||||
if status == "closed" and release_results == "on" and form.results_visibility == "never":
|
||||
# Beim Abschließen die Ergebnisse für Teilnehmende freigeben
|
||||
form.results_visibility = "after_close"
|
||||
audit.record(
|
||||
db, "form.status_changed", actor_id=auth.user.id, target_type="form", target_id=form.id,
|
||||
details={"status": status},
|
||||
@@ -274,6 +283,36 @@ def change_status(
|
||||
return RedirectResponse(f"/forms/{form.public_id}", status_code=303)
|
||||
|
||||
|
||||
@router.post("/{public_id}/archive")
|
||||
def archive_form(
|
||||
request: Request, db: Db, settings: AppSettings, auth: CurrentUser, form: EditForm,
|
||||
) -> Response:
|
||||
try:
|
||||
service.archive(form)
|
||||
except FormError as exc:
|
||||
db.rollback()
|
||||
return _designer(request, db, settings, form, error=_error(exc.code), status_code=400)
|
||||
audit.record(db, "form.archived", actor_id=auth.user.id, target_type="form",
|
||||
target_id=form.id)
|
||||
db.commit()
|
||||
return RedirectResponse(f"/forms/{form.public_id}", status_code=303)
|
||||
|
||||
|
||||
@router.post("/{public_id}/unarchive")
|
||||
def unarchive_form(
|
||||
request: Request, db: Db, settings: AppSettings, auth: CurrentUser, form: EditForm,
|
||||
) -> Response:
|
||||
try:
|
||||
service.unarchive(form)
|
||||
except FormError as exc:
|
||||
db.rollback()
|
||||
return _designer(request, db, settings, form, error=_error(exc.code), status_code=400)
|
||||
audit.record(db, "form.unarchived", actor_id=auth.user.id, target_type="form",
|
||||
target_id=form.id)
|
||||
db.commit()
|
||||
return RedirectResponse(f"/forms/{form.public_id}", status_code=303)
|
||||
|
||||
|
||||
def _question_page(
|
||||
request: Request,
|
||||
db: Db,
|
||||
|
||||
@@ -21,7 +21,7 @@ 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.deps import AppSettings, Db, FormArchived, FormFields
|
||||
from surveybox.web.templating import render
|
||||
|
||||
router = APIRouter(prefix="/i", include_in_schema=False)
|
||||
@@ -48,6 +48,8 @@ def open_invitation(request: Request, db: Db, settings: AppSettings, token: str)
|
||||
if found is None:
|
||||
return _invalid(request)
|
||||
invitation, form = found
|
||||
if form.archived_at is not None:
|
||||
raise FormArchived(form.title)
|
||||
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:
|
||||
|
||||
@@ -43,7 +43,7 @@ def index(request: Request, db: Db, auth: OptionalUser) -> Response:
|
||||
open_forms = form_service.open_forms_for(db, auth.user) if auth is not None else []
|
||||
# Teilnehmende, die bei einem Formular mitarbeiten, finden es über die Startseite
|
||||
team_forms = (
|
||||
team.list_forms(db, auth.user)
|
||||
[row for row in team.list_forms(db, auth.user) if row[0].archived_at is None]
|
||||
if auth is not None and auth.user.role == Role.PARTICIPANT
|
||||
else []
|
||||
)
|
||||
|
||||
@@ -30,10 +30,24 @@ from surveybox.mail import notify
|
||||
from surveybox.models import Form as FormModel
|
||||
from surveybox.models import GuestContact
|
||||
from surveybox.models import Response as ResponseModel
|
||||
from surveybox.web.deps import AppSettings, Db, FormFields, FormFiles, NotFound, request_ip
|
||||
from surveybox.web.deps import (
|
||||
AppSettings,
|
||||
Db,
|
||||
FormArchived,
|
||||
FormFields,
|
||||
FormFiles,
|
||||
NotFound,
|
||||
request_ip,
|
||||
)
|
||||
from surveybox.web.downloads import json_download
|
||||
from surveybox.web.media_response import media_response
|
||||
from surveybox.web.routes.fill import edit_page, results_page, save_edit_for
|
||||
from surveybox.web.routes.fill import (
|
||||
calendar_links,
|
||||
calendar_response,
|
||||
edit_page,
|
||||
results_page,
|
||||
save_edit_for,
|
||||
)
|
||||
from surveybox.web.templating import render
|
||||
|
||||
router = APIRouter(prefix="/r", include_in_schema=False)
|
||||
@@ -48,6 +62,8 @@ def _found(
|
||||
db.commit() # Zähler für Fehlversuche
|
||||
return None
|
||||
form = db.get(FormModel, own.form_id)
|
||||
if form is not None and form.archived_at is not None:
|
||||
raise FormArchived(form.title)
|
||||
return (own, form) if form is not None else None
|
||||
|
||||
|
||||
@@ -84,6 +100,8 @@ def _page(
|
||||
"documents": followups.delivered_documents(db, form, response_id=own.id),
|
||||
"results_url": f"/r/{token}/results"
|
||||
if public_results.visible(form, participated=True) else None,
|
||||
"confirmed": service.confirmed_polls(form),
|
||||
**calendar_links(settings, form, base=f"/r/{token}"),
|
||||
**extra,
|
||||
},
|
||||
status_code=status_code,
|
||||
@@ -101,6 +119,18 @@ def personal(request: Request, db: Db, settings: AppSettings, token: str) -> Res
|
||||
saved=notice == "saved", notify_changed=notice == "notify")
|
||||
|
||||
|
||||
@router.get("/{token}/calendar.ics")
|
||||
def personal_calendar(request: Request, db: Db, settings: AppSettings, token: str) -> Response:
|
||||
"""Festgelegte Termine als Datei, für Gäste mit persönlichem Link."""
|
||||
found = _found(request, db, settings, token)
|
||||
if found is None:
|
||||
return _invalid(request)
|
||||
_, form = found
|
||||
if form.calendar_mode == "off" or service.fill_state(form) == FillState.DRAFT:
|
||||
raise NotFound()
|
||||
return calendar_response(settings, form, download=True)
|
||||
|
||||
|
||||
@router.get("/{token}/results")
|
||||
def personal_results(request: Request, db: Db, settings: AppSettings, token: str) -> Response:
|
||||
"""Ergebnisse: Wer den persönlichen Link hat, hat teilgenommen."""
|
||||
|
||||
@@ -217,6 +217,7 @@ textarea {
|
||||
/* Phase 3: Formulare */
|
||||
.status-open { color: var(--sb-ok); border-color: var(--sb-ok); }
|
||||
.status-closed { opacity: 0.75; }
|
||||
.status-archived { opacity: 0.6; border-style: dashed; }
|
||||
.alert.info { border-color: var(--sb-accent); color: var(--sb-text); }
|
||||
.link-inline { word-break: break-all; }
|
||||
.question-list { list-style: none; padding: 0; margin: 0 0 16px; }
|
||||
@@ -351,8 +352,16 @@ body.framed .content { padding-top: 16px; }
|
||||
.summary-bars td:not(.num) { width: 50%; }
|
||||
.summary-bars .num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.date-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--sb-border); }
|
||||
.date-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) minmax(0, 0.8fr); gap: 8px 12px; padding: 6px 0; border-bottom: 1px solid var(--sb-border); }
|
||||
.date-row label, .option-row .capacity { display: grid; gap: 2px; font-size: 0.875rem; }
|
||||
/* Termin-Zeilen: Felder füllen ihre Spalte, damit nichts überlappt; Hinweis über die ganze Breite */
|
||||
.date-row label { min-width: 0; }
|
||||
.date-row input { width: 100%; min-width: 0; max-width: none; }
|
||||
.date-row .date-note { grid-column: 1 / -1; }
|
||||
@media (max-width: 480px) {
|
||||
.date-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
|
||||
.date-row .date-day { grid-column: 1 / -1; }
|
||||
}
|
||||
.option-row .capacity input { max-width: 120px; }
|
||||
|
||||
.slot { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
|
||||
@@ -600,3 +609,8 @@ body.compact .card { padding: 16px 20px; }
|
||||
.doc-toc ul { columns: 2 16rem; margin: 0; padding-left: 1.25rem; }
|
||||
.legal { max-width: 48rem; margin: 0 auto; }
|
||||
.legal h2 { border-top: 0; padding-top: 0; margin-top: 24px; }
|
||||
|
||||
/* Archiv in der Formularliste */
|
||||
.inline-heading { display: inline; margin: 0; }
|
||||
.poll-result .poll-names td { padding-top: 0; font-size: 0.8125rem; color: var(--sb-muted); }
|
||||
.poll-result .poll-names span + span::before { content: " · "; }
|
||||
@@ -0,0 +1,21 @@
|
||||
{# Festgelegte Termine und Kalender: confirmed = [(Frage, Optionen)], calendar_url, feed_url #}
|
||||
{% macro confirmed_dates(confirmed, calendar_url, feed_url) %}
|
||||
{% if confirmed %}
|
||||
<h2>{{ _('Decided') }}</h2>
|
||||
{% for q, options in confirmed %}
|
||||
{% if confirmed | length > 1 %}<p class="hint">{{ q.label }}</p>{% endif %}
|
||||
<ul class="plain-list confirmed-list">
|
||||
{% for option in options %}<li>{{ option_text(option) }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if calendar_url or feed_url %}
|
||||
<div class="inline-actions">
|
||||
{% if calendar_url %}<a class="button secondary" href="{{ calendar_url }}">{{ _('Add confirmed dates to my calendar') }}</a>{% endif %}
|
||||
</div>
|
||||
{% if feed_url %}
|
||||
<p class="hint">{{ _('Subscription link for calendar programs (stays up to date if dates change):') }}</p>
|
||||
<p><code class="link-inline">{{ feed_url }}</code></p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -8,6 +8,10 @@
|
||||
{% elif code == 404 %}
|
||||
<h1>{{ _('Not found') }}</h1>
|
||||
<p>{{ _('This page does not exist.') }}</p>
|
||||
{% elif code == 'archived' %}
|
||||
<h1>{{ title }}</h1>
|
||||
<p>{{ _('This form has been archived and can no longer be opened.') }}</p>
|
||||
<p class="hint">{{ _('If you took part as a guest, you can still download or delete your data under “Request my links”.') }} <a href="/links">{{ _('Request my links') }}</a></p>
|
||||
{% elif code == 'csrf' %}
|
||||
<h1>{{ _('Request rejected') }}</h1>
|
||||
<p>{{ _('The form could not be verified. Please reload the page and try again.') }}</p>
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
{% if form.slot_names in ('full', 'short') and not form.anonymous and form.questions | selectattr('type', 'equalto', 'slots') | list %}
|
||||
<p class="hint names-notice">{% if form.slot_names == 'short' %}{{ _('For the entries, everyone who opens this form sees who has already signed up: first name and the initial of the last name.') }}{% else %}{{ _('For the entries, everyone who opens this form sees who has already signed up, with first and last name.') }}{% endif %}</p>
|
||||
{% endif %}
|
||||
{% if form.poll_names in ('full', 'short') and form.results_visibility != 'never' and not form.anonymous and form.questions | selectattr('type', 'equalto', 'poll') | list %}
|
||||
<p class="hint names-notice">{% if form.poll_names == 'short' %}{{ _('In the results, participants see how each person voted in polls: first name and the initial of the last name.') }}{% else %}{{ _('In the results, participants see how each person voted in polls, with first and last name.') }}{% endif %}</p>
|
||||
{% endif %}
|
||||
{% if errors or consent_error or guest_email_error %}
|
||||
<p class="alert error" role="alert">{{ _('Please check the marked questions.') }}</p>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "_calendar_links.html" import confirmed_dates with context %}
|
||||
{% block title %}{{ form.title }} · {{ appearance.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -7,10 +8,23 @@
|
||||
{% if state == 'scheduled' %}
|
||||
<p>{{ _('This form opens on %(date)s.', date=form.opens_at | datetime) }}</p>
|
||||
{% else %}
|
||||
<p>{{ _('This form is closed. Answers can no longer be submitted.') }}</p>
|
||||
<p>{{ _('This form is completed. Answers can no longer be submitted.') }}</p>
|
||||
{% endif %}
|
||||
{{ confirmed_dates(confirmed or [], calendar_url or '', feed_url or '') }}
|
||||
{% if results_url %}
|
||||
<p><a class="button" href="{{ results_url }}">{{ _('Show results') }}</a></p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% if own %}
|
||||
<section class="card narrow">
|
||||
<h2>{{ _('Your answer') }}</h2>
|
||||
<p class="hint">{{ _('Your answer from %(date)s.', date=own.submitted_at | datetime) }}{% if own.updated_at %} {{ _('Last changed %(date)s.', date=own.updated_at | datetime) }}{% endif %}</p>
|
||||
<dl class="answers">
|
||||
{% for q, text, files in rows %}
|
||||
<dt>{{ q.label }}</dt>
|
||||
<dd>{% if files %}{% for f in files %}{{ f.name }} <span class="hint">({{ f.size | filesize }})</span>{% if not loop.last %}, {% endif %}{% endfor %}{% else %}{{ text or '—' }}{% endif %}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,5 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "_comments.html" import comment_section with context %}
|
||||
{% from "_calendar_links.html" import confirmed_dates with context %}
|
||||
{% block title %}{{ form.title }} · {{ appearance.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -37,9 +38,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if calendar_url %}
|
||||
<p><a class="button secondary" href="{{ calendar_url }}">{{ _('Add confirmed dates to my calendar') }}</a></p>
|
||||
{% endif %}
|
||||
{{ confirmed_dates([], calendar_url or '', feed_url or '') }}
|
||||
{% if results_url %}
|
||||
<p><a class="button" href="{{ results_url }}">{{ _('Show results') }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
{% set is_owner = request.state.form_level >= 3 %}
|
||||
{% set is_creator = user.role in ('admin', 'creator') %}
|
||||
{% if error %}<p class="alert error" role="alert">{{ _(error) }}</p>{% endif %}
|
||||
{% if form.archived_at %}
|
||||
<p class="alert info" role="status">{{ _('This form is archived since %(date)s. Participants can no longer open it, not even with their links. Answers and export remain available.', date=form.archived_at | datetime) }}</p>
|
||||
{% elif state == 'closed' and not form.is_template %}
|
||||
<p class="hint">{{ _('Completed: no further answers. Participants can still open the form and see their own answer, confirmed dates and, if released, the results. Archive the form to make it unavailable to them.') }}</p>
|
||||
{% endif %}
|
||||
{% if overbooked %}
|
||||
<div class="alert warn" role="status">
|
||||
<p>{{ _('More places are booked than available:') }} {{ overbooked | join('; ') }}</p>
|
||||
@@ -52,19 +57,36 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<form method="post" action="/forms/{{ form.public_id }}/status">
|
||||
{{ csrf_field(request) }}
|
||||
{% if form.status == 'draft' %}
|
||||
<input type="hidden" name="status" value="open">
|
||||
<button type="submit">{{ _('Publish') }}</button>
|
||||
{% elif form.status == 'open' %}
|
||||
<input type="hidden" name="status" value="closed">
|
||||
<button type="submit" class="danger">{{ _('Close') }}</button>
|
||||
{% else %}
|
||||
<input type="hidden" name="status" value="open">
|
||||
<button type="submit">{{ _('Reopen') }}</button>
|
||||
{% endif %}
|
||||
{% if form.archived_at %}
|
||||
<form method="post" action="/forms/{{ form.public_id }}/unarchive">
|
||||
{{ csrf_field(request) }}<button type="submit">{{ _('Take out of the archive') }}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
{% if form.status == 'draft' %}
|
||||
<form method="post" action="/forms/{{ form.public_id }}/status">
|
||||
{{ csrf_field(request) }}<input type="hidden" name="status" value="open">
|
||||
<button type="submit">{{ _('Publish') }}</button>
|
||||
</form>
|
||||
{% elif form.status == 'open' and state != 'closed' %}
|
||||
<form method="post" action="/forms/{{ form.public_id }}/status" class="inline-check">
|
||||
{{ csrf_field(request) }}<input type="hidden" name="status" value="closed">
|
||||
{% if form.results_visibility == 'never' %}
|
||||
<label class="check"><input type="checkbox" name="release_results" value="on"> {{ _('Release the results to participants') }}</label>
|
||||
{% endif %}
|
||||
<button type="submit" class="danger">{{ _('Complete') }}</button>
|
||||
</form>
|
||||
{% elif form.status == 'closed' %}
|
||||
<form method="post" action="/forms/{{ form.public_id }}/status">
|
||||
{{ csrf_field(request) }}<input type="hidden" name="status" value="open">
|
||||
<button type="submit" class="secondary">{{ _('Reopen') }}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if state == 'closed' %}
|
||||
<form method="post" action="/forms/{{ form.public_id }}/archive">
|
||||
{{ csrf_field(request) }}<button type="submit" class="secondary">{{ _('Archive') }}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<dl class="status">
|
||||
|
||||
@@ -78,6 +78,13 @@
|
||||
<option value="after_close" {% if form.results_visibility == 'after_close' %}selected{% endif %}>{{ _('After the form closes') }}</option>
|
||||
</select>
|
||||
<p class="hint">{{ _('Participants see counts, bars, averages, polls and the occupancy of entries – never free-text answers, files or questions marked as personal. Names at entries appear only if the form shows them anyway. Guests without an account see the results for a week after taking part, or with their personal link. With very few answers, results can reveal how individuals answered.') }}</p>
|
||||
<label for="poll_names">{{ _('Polls in the results') }}</label>
|
||||
<select id="poll_names" name="poll_names" {% if form.anonymous %}disabled{% endif %}>
|
||||
<option value="off" {% if form.poll_names == 'off' %}selected{% endif %}>{{ _('Only the number of answers per option') }}</option>
|
||||
<option value="short" {% if form.poll_names == 'short' %}selected{% endif %}>{{ _('With names: first name and initial of the last name') }}</option>
|
||||
<option value="full" {% if form.poll_names == 'full' %}selected{% endif %}>{{ _('With names: first and last name') }}</option>
|
||||
</select>
|
||||
<p class="hint">{{ _('Applies when participants see the results: with names, everyone can see who voted how. The form tells participants about it before they vote. Not for anonymous forms.') }}</p>
|
||||
</section>
|
||||
|
||||
<section class="card" id="calendar">
|
||||
|
||||
@@ -26,6 +26,26 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
{% if archived %}
|
||||
<section class="card" id="archive">
|
||||
<details>
|
||||
<summary><h2 class="inline-heading">{{ _('Archive') }} ({{ archived | length }})</h2></summary>
|
||||
<p class="hint">{{ _('Archived forms can no longer be opened by participants, not even with their links. Answers, export and settings remain available here; a form can be taken out of the archive at any time.') }}</p>
|
||||
<table class="table">
|
||||
<thead><tr><th>{{ _('Title') }}</th><th>{{ _('Answers') }}</th><th>{{ _('Archived') }}</th></tr></thead>
|
||||
<tbody>
|
||||
{% for form, count, level in archived %}
|
||||
<tr>
|
||||
<td><a href="/forms/{{ form.public_id }}{% if level < 2 %}/responses{% endif %}">{{ form.title }}</a></td>
|
||||
<td>{{ count }}</td>
|
||||
<td>{{ form.archived_at | datetime }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</details>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if trash or trash_error %}
|
||||
<section class="card">
|
||||
<h2>{{ _('Trash') }}</h2>
|
||||
|
||||
@@ -6,6 +6,17 @@
|
||||
{% for option in options %}
|
||||
- {{ option_text(option) }}
|
||||
{% endfor %}
|
||||
{% if votes %}
|
||||
|
||||
{% if show_counts %}{{ _('Your vote and the result:') }}{% else %}{{ _('Your vote:') }}{% endif %}
|
||||
|
||||
{% for row in votes %}
|
||||
- {{ row.text }}{% if row.confirmed %} ({{ _('confirmed') }}){% endif %}: {% if row.vote == 'yes' %}{{ _('Yes') }}{% elif row.vote == 'maybe' %}{{ _('Maybe') }}{% elif row.vote == 'no' %}{{ _('No') }}{% else %}–{% endif %}{% if show_counts and row.counts %} · {% if maybe %}{{ _('all votes: %(yes)s yes, %(maybe)s maybe, %(no)s no', yes=row.counts.yes, maybe=row.counts.maybe, no=row.counts.no) }}{% else %}{{ _('all votes: %(yes)s yes, %(no)s no', yes=row.counts.yes, no=row.counts.no) }}{% endif %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if guest %}{{ _('Your personal link to your answer is in your confirmation email. You can request it again here:') }}{% else %}{{ _('Your answer and the confirmed dates, also after the end of the form:') }}{% endif %}
|
||||
|
||||
{{ link }}
|
||||
{% if calendar %}
|
||||
@@ -13,8 +24,8 @@
|
||||
{{ _('Calendar file with the confirmed dates:') }}
|
||||
{{ calendar }}
|
||||
{% endif %}
|
||||
{% if guest %}
|
||||
{% if feed %}
|
||||
|
||||
{{ _('Your personal link to your answer is in your confirmation email. You can request it again here:') }}
|
||||
{{ links_url }}
|
||||
{{ _('Subscription link for calendar programs (stays up to date if dates change):') }}
|
||||
{{ feed }}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,16 @@
|
||||
{% set subject = _('New proposal: %(title)s', title=form.title) %}
|
||||
{% if name %}{{ _('Hello %(name)s,', name=name) }}{% else %}{{ _('Hello,') }}{% endif %}
|
||||
|
||||
{{ ngettext('A participant has proposed a further option in “%(title)s”:', 'Participants have proposed further options in “%(title)s”:', options | length, title=form.title) }}
|
||||
|
||||
{% for option in options %}
|
||||
- {{ option_text(option) }}
|
||||
{% endfor %}
|
||||
|
||||
{% if guest %}
|
||||
{{ _('You have already taken part. If you like, add your vote for the new option to your answer: open your personal link from your confirmation email. You can request it again here:') }}
|
||||
{{ links_url }}
|
||||
{% else %}
|
||||
{{ _('You have already taken part. If you like, add your vote for the new option to your answer:') }}
|
||||
{{ link }}
|
||||
{% endif %}
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "_calendar_links.html" import confirmed_dates with context %}
|
||||
{% block title %}{% if form %}{{ form.title }} · {% endif %}{{ appearance.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -35,6 +36,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{{ confirmed_dates(confirmed or [], calendar_url or '', feed_url or '') }}
|
||||
{% if results_url %}
|
||||
<p><a class="button secondary" href="{{ results_url }}">{{ _('Show results') }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
<option value="ynm" {% if values.get('answers') == 'ynm' %}selected{% endif %}>{{ _('Yes / Maybe / No') }}</option>
|
||||
</select>
|
||||
{{ check('allow_proposals', _('Participants may propose further options')) }}
|
||||
<p class="hint">{{ _('A proposal counts as a “yes” from the person who made it. Everyone who has already taken part gets an email about it so they can add to their answer, provided participants may change their answer.') }}</p>
|
||||
<fieldset class="options-editor" data-poll-dates>
|
||||
<legend>{{ _('Dates') }}</legend>
|
||||
<p class="hint">{{ _('Only used when the options are dates. Time and duration are optional; without a time the date counts as a whole day.') }}</p>
|
||||
@@ -138,10 +139,10 @@
|
||||
{% for o in date_rows + [{}, {}, {}] %}
|
||||
<div class="date-row">
|
||||
<input type="hidden" name="date_option_id" value="{{ o.id or '' }}">
|
||||
<label>{{ _('Date') }} <input type="date" name="option_date" value="{{ o.date or '' }}"></label>
|
||||
<label class="date-day">{{ _('Date') }} <input type="date" name="option_date" value="{{ o.date or '' }}"></label>
|
||||
<label>{{ _('Time') }} <input type="time" name="option_time" value="{{ o.time or '' }}"></label>
|
||||
<label>{{ _('Minutes') }} <input type="number" name="option_duration" min="1" max="20160" value="{{ o.duration or '' }}"></label>
|
||||
<label>{{ _('Note') }} <input type="text" name="date_option_label" maxlength="200" value="{{ o.label or '' }}"></label>
|
||||
<label>{{ _('Duration (min.)') }} <input type="number" name="option_duration" min="1" max="20160" value="{{ o.duration or '' }}"></label>
|
||||
<label class="date-note">{{ _('Note') }} <input type="text" name="date_option_label" maxlength="200" value="{{ o.label or '' }}"></label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button type="button" class="secondary" data-add-row="date-row" hidden>{{ _('Add row') }}</button>
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
<tbody>
|
||||
{% for row in s.poll_rows %}
|
||||
<tr{% if row.best %} class="best"{% endif %}><td>{{ row.text }}{% if row.confirmed %} <span class="badge status-open">{{ _('confirmed') }}</span>{% endif %}</td><td class="num">{{ row.yes }}</td>{% if s.question.config.answers == 'ynm' %}<td class="num">{{ row.maybe }}</td>{% endif %}<td class="num">{{ row.no }}</td></tr>
|
||||
{% if row.names %}
|
||||
<tr class="poll-names"><td colspan="{{ 4 if s.question.config.answers == 'ynm' else 3 }}">
|
||||
{% if row.names.yes %}<span>{{ _('Yes') }}: {{ row.names.yes | join(', ') }}</span>{% endif %}
|
||||
{% if row.names.maybe %}<span>{{ _('Maybe') }}: {{ row.names.maybe | join(', ') }}</span>{% endif %}
|
||||
{% if row.names.no %}<span>{{ _('No') }}: {{ row.names.no | join(', ') }}</span>{% endif %}
|
||||
</td></tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Abschließen und Archivieren, festgelegte Termine für alle, die abgestimmt haben (CI)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
pytest.importorskip("fastapi")
|
||||
|
||||
from helpers import new_client, token_for
|
||||
from test_forms import creator, fill, participant, save_settings, set_status
|
||||
from test_guests import links_in
|
||||
from test_invitations import invite, run
|
||||
from test_mail import content, messages
|
||||
from test_phase5 import options_of, poll_form
|
||||
|
||||
pytestmark = pytest.mark.db
|
||||
|
||||
|
||||
def confirm(owner: Any, pid: str, qid: int, option_ids: list[str]) -> None:
|
||||
csrf = token_for(owner, f"/forms/{pid}/responses")
|
||||
resp = owner.post(f"/forms/{pid}/questions/{qid}/confirm",
|
||||
data={"csrf_token": csrf, "confirmed": option_ids})
|
||||
assert resp.status_code == 303
|
||||
|
||||
|
||||
def post(client: Any, path: str, **data: str) -> Any:
|
||||
return client.post(path, data={"csrf_token": token_for(client, path.rsplit("/", 1)[0]),
|
||||
**data})
|
||||
|
||||
|
||||
def test_everyone_who_voted_hears_about_the_decision(app: Any) -> None:
|
||||
owner = creator(app)
|
||||
pid, token, qid = poll_form(owner) # Zugang per Link, Abo-Link, Ergebnisse nach Teilnahme
|
||||
first, second = (o["id"] for o in options_of(qid))
|
||||
anna = participant(app, "anna-termin@example.de")
|
||||
assert fill(anna, token, {f"q{qid}_{first}": "yes", f"q{qid}_{second}": "no"}).status_code \
|
||||
== 303
|
||||
# Per Mail eingeladener Gast ohne Konto stimmt über seinen Einladungslink ab
|
||||
invite(owner, pid, "erika-termin@example.org")
|
||||
run()
|
||||
link = links_in(content(messages("invitation")[0])["text"], "/i/")[0]
|
||||
erika = new_client(app)
|
||||
erika.get(link)
|
||||
assert fill(erika, token, {f"q{qid}_{first}": "maybe", f"q{qid}_{second}": "yes"}).status_code \
|
||||
== 303
|
||||
# Gast ohne Einladung und ohne bestätigte Adresse: keine Mail
|
||||
assert fill(new_client(app), token, {f"q{qid}_{first}": "yes",
|
||||
f"q{qid}_{second}": "yes"}).status_code == 303
|
||||
|
||||
assert set_status(owner, pid, "closed").status_code == 303
|
||||
confirm(owner, pid, qid, [first])
|
||||
mails = {m.recipient: content(m)["text"] for m in messages("confirmed")}
|
||||
assert set(mails) == {"anna-termin@example.de", "erika-termin@example.org"}
|
||||
# Eigene Stimme, Anzahlen (Ergebnisse sind freigegeben) und Abo-Link
|
||||
assert "Your vote and the result:" in mails["erika-termin@example.org"]
|
||||
assert "Maybe · all votes: 2 yes, 1 maybe, 0 no" in mails["erika-termin@example.org"]
|
||||
assert "/calendar/" in mails["anna-termin@example.de"]
|
||||
assert "/i/" in mails["erika-termin@example.org"]
|
||||
assert f"/f/{token}" in mails["anna-termin@example.de"]
|
||||
|
||||
# Nach dem Abschluss bleibt die eigene Antwort mit dem festgelegten Termin lesbar
|
||||
page = anna.get(f"/f/{token}").text
|
||||
assert "This form is completed" in page and "Your answer" in page
|
||||
assert "Decided" in page and "/calendar/" in page and f"/f/{token}/calendar.ics" in page
|
||||
personal = erika.get(link)
|
||||
assert personal.status_code == 303 and personal.headers["location"].startswith("/r/")
|
||||
page = erika.get(personal.headers["location"]).text
|
||||
assert "Decided" in page and "/calendar.ics" in page
|
||||
|
||||
|
||||
def test_poll_names_in_results(app: Any) -> None:
|
||||
owner = creator(app)
|
||||
pid, token, qid = poll_form(owner)
|
||||
assert save_settings(owner, pid, access="link", calendar_mode="feed",
|
||||
results_visibility="after_submit", poll_names="full").status_code == 303
|
||||
first, second = (o["id"] for o in options_of(qid))
|
||||
anna = participant(app, "anna-namen@example.de")
|
||||
page = anna.get(f"/f/{token}").text
|
||||
assert "see how each person voted in polls" in page
|
||||
assert fill(anna, token, {f"q{qid}_{first}": "yes", f"q{qid}_{second}": "no"}).status_code \
|
||||
== 303
|
||||
results = anna.get(f"/f/{token}/results").text
|
||||
assert 'class="poll-names"' in results and "Yes: Anna" in results
|
||||
|
||||
|
||||
def test_archive_hides_the_form_from_participants(app: Any) -> None:
|
||||
owner = creator(app)
|
||||
pid, token, qid = poll_form(owner)
|
||||
first, second = (o["id"] for o in options_of(qid))
|
||||
guest = new_client(app)
|
||||
assert fill(guest, token, {f"q{qid}_{first}": "yes", f"q{qid}_{second}": "no"}).status_code \
|
||||
== 303
|
||||
# Nur abgeschlossene Formulare lassen sich archivieren
|
||||
resp = post(owner, f"/forms/{pid}/archive")
|
||||
assert resp.status_code == 400 and "Only completed forms" in resp.text
|
||||
assert set_status(owner, pid, "closed").status_code == 303
|
||||
confirm(owner, pid, qid, [first])
|
||||
feed = links_in(owner.get(f"/forms/{pid}/settings").text, "/calendar/")
|
||||
assert post(owner, f"/forms/{pid}/archive").status_code == 303
|
||||
|
||||
assert guest.get(f"/f/{token}").status_code == 410
|
||||
assert guest.get(f"/f/{token}/results").status_code == 410
|
||||
assert guest.get(f"/f/{token}/calendar.ics").status_code == 410
|
||||
for url in feed:
|
||||
assert guest.get(url).status_code == 404
|
||||
listing = owner.get("/forms").text
|
||||
assert 'id="archive"' in listing and "Archived" in listing
|
||||
designer = owner.get(f"/forms/{pid}").text
|
||||
assert "Take out of the archive" in designer
|
||||
assert set_status(owner, pid, "open").status_code == 400 # erst aus dem Archiv holen
|
||||
assert owner.get(f"/forms/{pid}/responses").status_code == 200
|
||||
|
||||
assert post(owner, f"/forms/{pid}/unarchive").status_code == 303
|
||||
assert guest.get(f"/f/{token}").status_code == 200
|
||||
|
||||
|
||||
def test_release_results_when_completing(app: Any) -> None:
|
||||
owner = creator(app)
|
||||
pid, token, qid = poll_form(owner)
|
||||
assert save_settings(owner, pid, access="link", results_visibility="never").status_code \
|
||||
== 303
|
||||
first, second = (o["id"] for o in options_of(qid))
|
||||
guest = new_client(app)
|
||||
assert fill(guest, token, {f"q{qid}_{first}": "yes", f"q{qid}_{second}": "no"}).status_code \
|
||||
== 303
|
||||
assert guest.get(f"/f/{token}/results").status_code == 404
|
||||
csrf = token_for(owner, f"/forms/{pid}")
|
||||
owner.post(f"/forms/{pid}/status", data={"csrf_token": csrf, "status": "closed",
|
||||
"release_results": "on"})
|
||||
assert guest.get(f"/f/{token}/results").status_code == 200
|
||||
+1
-1
@@ -375,7 +375,7 @@ def test_closed_form(app: Any) -> None:
|
||||
assert set_status(owner, pid, "closed").status_code == 303
|
||||
guest = new_client(app)
|
||||
page = guest.get(f"/f/{token}")
|
||||
assert "This form is closed" in page.text
|
||||
assert "This form is completed" in page.text
|
||||
csrf = token_for(guest, "/login") # die Seite des beendeten Formulars hat kein Formular
|
||||
guest.post(f"/f/{token}", data={"csrf_token": csrf, f"q{q_name}": "Zu spät"})
|
||||
assert response_count(pid) == 0
|
||||
|
||||
@@ -100,7 +100,16 @@ CONTEXTS: dict[str, dict[str, Any]] = {
|
||||
"promoted": {"entry": "Fr früh", "link": "https://umfrage.example/f/t"},
|
||||
"confirmed": {"options": [{"id": "a", "date": "2026-07-01", "time": None,
|
||||
"duration": None, "label": "Grill"}],
|
||||
"link": "https://umfrage.example/f/t", "calendar": None},
|
||||
"link": "https://umfrage.example/f/t", "calendar": None,
|
||||
"votes": [{"text": "1. Juli <b>", "vote": "yes", "confirmed": True,
|
||||
"counts": {"yes": 3, "maybe": 1, "no": 0}},
|
||||
{"text": "8. Juli", "vote": "", "confirmed": False,
|
||||
"counts": None}],
|
||||
"show_counts": True, "maybe": True,
|
||||
"feed": "https://umfrage.example/calendar/abc.ics"},
|
||||
"proposed": {"options": [{"id": "b", "date": "2026-07-02", "time": "18:30",
|
||||
"duration": None, "label": "", "proposed": True}],
|
||||
"link": "https://umfrage.example/f/t"},
|
||||
"comment_new": {"pending": True, "link": "https://umfrage.example/forms/x/comments"},
|
||||
"comment_published": {"link": "https://umfrage.example/f/t"},
|
||||
"slot_full": {"entry": "Fr", "link": "https://umfrage.example/forms/x/responses"},
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Neue Vorschläge in Abstimmungen: Hinweis an alle, die schon teilgenommen haben (CI)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
pytest.importorskip("fastapi")
|
||||
|
||||
from test_forms import creator, fill, participant, save_settings
|
||||
from test_mail import messages
|
||||
from test_phase5 import options_of, poll_form
|
||||
|
||||
pytestmark = pytest.mark.db
|
||||
|
||||
|
||||
def votes(qid: int, value: str = "yes") -> dict[str, str]:
|
||||
return {f"q{qid}_{o['id']}": value for o in options_of(qid)}
|
||||
|
||||
|
||||
def test_proposal_notifies_earlier_participants(app: Any) -> None:
|
||||
owner = creator(app)
|
||||
_, token, qid = poll_form(owner)
|
||||
anna = participant(app, "anna-vorschlag@example.de")
|
||||
bert = participant(app, "bert-vorschlag@example.de")
|
||||
assert fill(anna, token, votes(qid)).status_code == 303
|
||||
assert messages("proposed") == []
|
||||
|
||||
# Bert schlägt beim Absenden einen weiteren Termin vor: Anna erfährt davon, Bert nicht
|
||||
resp = fill(bert, token, {**votes(qid, "no"), f"q{qid}_propose_date": "2026-07-22",
|
||||
f"q{qid}_propose_time": "18:00"})
|
||||
assert resp.status_code == 303
|
||||
sent = messages("proposed")
|
||||
assert [m.recipient for m in sent] == ["anna-vorschlag@example.de"]
|
||||
|
||||
# Anna ergänzt ihre Antwort um einen eigenen Vorschlag: jetzt erfährt es Bert
|
||||
resp = fill(anna, token, {**votes(qid), f"q{qid}_propose_date": "2026-07-29"}, path="/edit")
|
||||
assert resp.status_code == 303
|
||||
sent = messages("proposed")
|
||||
assert sorted(m.recipient for m in sent) == ["anna-vorschlag@example.de",
|
||||
"bert-vorschlag@example.de"]
|
||||
# Ohne neuen Vorschlag keine weitere Mail
|
||||
assert fill(anna, token, votes(qid), path="/edit").status_code == 303
|
||||
assert len(messages("proposed")) == 2
|
||||
|
||||
|
||||
def test_no_notice_when_answers_cannot_be_changed(app: Any) -> None:
|
||||
owner = creator(app)
|
||||
pid, token, qid = poll_form(owner)
|
||||
assert save_settings(owner, pid, access="link", allow_edit="no").status_code == 303
|
||||
anna = participant(app, "anna-fest@example.de")
|
||||
bert = participant(app, "bert-fest@example.de")
|
||||
assert fill(anna, token, votes(qid)).status_code == 303
|
||||
assert fill(bert, token, {**votes(qid), f"q{qid}_propose_date": "2026-07-22"}).status_code \
|
||||
== 303
|
||||
assert messages("proposed") == []
|
||||
Reference in new issue
Block a user