16 Commits
Author SHA1 Message Date
admin.juergenandClaude Fable 5 6077832efc Honor the mandatory flag with explicit no-answer options
Symfony's required default forced an answer to every question no matter
what the mandatory checkbox said. Optional choice questions now offer a
dedicated 'Keine Antwort' option, optional range and text questions a
'Keine Angaben machen' checkbox (preselected for ranges, because a slider
always submits a value); the side that is not chosen gets dimmed but stays
clickable. Mandatory ranges start their value display at '?' and reject
the submit until the slider was actually used, so the browser's midpoint
default no longer leaks into the results.

Empty answers are stored as a deliberate 'no answer', kept out of counts,
averages and charts, and reported separately on the results page and in
the PDF export. Also gives the reader textarea its full width and field
styling, adds grid overflow guards for unbreakable content and styles the
form error box.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-26 14:36:38 +02:00
Claude Fable 5 d187f558b2 Name the survey list area 'Umfragen-Übersicht' and relabel back buttons
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 12:47:40 +02:00
Claude Fable 5 f3f9dab184 Friendlier logged-out notice with session duration and login link
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 12:41:34 +02:00
Claude Fable 5 833a8964cf Add topic sections, ordered inserts, rich-text descriptions and grouped results (Ausbaustufe 3)
- section content type with structure service, reader context and grouped results/PDF/Excel
- new questions append at the end (backend oncreate) and per-section add buttons
- rich-text descriptions: Quill 2 (frontend), reduced TinyMCE (backend), server-side whitelist sanitizer
- externalize inline assets, bundle Chart.js locally, harden debug access, validate range bounds

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 07:57:40 +02:00
Claude a9ffffbc78 Drop the confirmation field from the change password copy
The form asks for the new password once, not twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 20:50:14 +02:00
Claude 3a95ab9dcd Style the change password module
Add a template override for Contao's changePassword module with the
same card, explanatory copy and corporate design as the lost password
module.

The card rules keyed off .mod_lostPassword.block, which does not scale
to a third auth module. Move them to a .survey-auth-module class that
the overrides put on the wrapper themselves, so another auth module
needs one line and no new CSS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 20:45:50 +02:00
Claude d8891315f9 Style password reset flow and send corporate design mails
Give the lost password module the same centred card as the login,
right-align the reset link, add explanatory copy and a way back to
the login from every dead end Contao routes through mod_message.

Contao only sets a text body on the opt-in mail, so a MessageEvent
listener adds an HTML alternative in the corporate design. It reads
the locale from the fallback root page because mails can go out from
a CLI worker, where kernel.default_locale is "en".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 16:08:58 +02:00
admin.juergenandClaude Opus 4.8 c7439e4822 Fix customer-reported survey results and list issues
Behebt die Fehler aus der Kunden-Testrunde (Praktikantin, Juli 2026):

- Ergebnisreihenfolge: Fragen werden vor dem Finalisieren nach _sorting
  sortiert. finalizeQuestionResult entfernt _sorting, daher fiel die
  bisherige Nachsortierung auf den alphabetischen Fallback zurück. Online,
  PDF und Excel folgen jetzt derselben Frage-Sortierung.
- Excel-Export: Eigene Fragetext-Zeile über den Antwortspalten (je Frage
  über die zugehörigen Spalten zusammengeführt). Zuvor fehlte der Fragetext.
- Range-Ergebnis: Verteilung deckt die komplette Skala rangeMin..rangeMax in
  rangeStep-Schritten ab, damit die X-Achse linear und vollständig ist
  (vorher nur tatsächlich vorkommende Werte in gleichen Abständen).
- Teilnahmen/Rücklauf pro Frage als absolute Zahlen ("X von Y beantwortet",
  "Z übersprungen") statt reiner Prozent-Rücklaufquote.
- Freitextantworten gruppiert: jede Antwort einmal mit exakter Häufigkeit,
  ohne Prozentangaben und ohne Doppel-Auflistung.
- Frontend-Liste: "Link kopieren"-Button (absolute Reader-URL) für
  veröffentlichte Umfragen; Aktiv-Umschalter mit Textlabel statt nur Punkt;
  Aktionslinks öffnen im selben Tab statt in neuen Tabs.
- Duplizieren: Titel-Kollisionsprüfung ohne Ausschluss der Quell-ID, damit
  aus "... - Kopie" korrekt "... - Kopie 2" wird statt eines Dubletten-Titels.

Der internalNote-Fehler beim Anlegen/Duplizieren war ein fehlendes
DB-Schema-Update (Spalte tl_survey.internalNote) und wurde per
contao:migrate auf der Testumgebung nachgezogen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 19:30:34 +02:00
Jürgen MummertandClaude Opus 4.8 db7094fd1e Fix frontend CSRF, clean reader URLs, and review findings
CSRF / actions:
- List action forms now send both REQUEST_TOKEN (Contao gate) and _token
  (Symfony, validated via isCsrfTokenValid) — mirrors the editor; fixes
  the 400/500 "Ungültiger CSRF-Token" on publish/toggle/duplicate/delete

Public reader / URLs:
- Reader & results read auto_item via Input::get (marks the route param used)
  so clean path URLs /<page>/<alias> no longer 404
- List controller generates path URLs via ['parameters' => '/'.$alias]
- Allow re-participation in the same session after a 60s cooldown

Review fixes:
- Results: merge answer snapshots by questionId+type (no more split cards on
  label edits); seed "Vielleicht" when allowMaybe so screen matches Excel
- Reader: replace generic answer hint with per-option "weiter zu Frage X"
  only when a jump is configured; strip HTML tags from survey description
- PDF: render free-text frequency summary; drop duplicate "Minimum" label
- Drag-sort: bundle SortableJS locally, drop the duplicated inline sort CSS/JS
  from _survey_assets, throttle the backend MutationObserver
- Backend: move hardcoded tl_survey operation labels to TL_LANG (de+en)
- Remove dead code: SurveyEditorVoter, SurveyPermissionService,
  categoryFilter/categorySummary + helpers, orphaned publishSurvey lang key

Reader layout:
- max-width 1000px (other views keep 1400px); back/next buttons fill the
  width as equal, card-sized halves; sort handle icon offset tweak

Docs: update AI_HANDOVER (dual-token CSRF, clean URLs) and README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 13:00:05 +02:00
Jürgen Mummert 1b16675ae9 Add survey question drag-sort and backend assets
- Frontend editor: drag-to-sort questions with dedicated sort assets/JS
- Backend list/search refinements for tl_survey and tl_survey_content
- Repository helpers for survey/question/editor queries
- Translations and AI handover notes update
2026-06-14 09:13:07 +02:00
Jürgen Mummert d44f3be571 Add survey duplication actions 2026-06-08 14:06:32 +02:00
Jürgen Mummert b7bcdd8372 Clean up obsolete survey editor and DCA code 2026-06-07 22:16:37 +02:00
Jürgen Mummert 59514c6911 Separate survey list controls from editor view 2026-06-07 20:31:31 +02:00
Jürgen Mummert 1174410c1b Refine survey editor workflow and publication handling 2026-05-29 10:19:19 +02:00
Jürgen Mummert a893078945 Refine survey editor flow and auth styling 2026-05-25 16:02:47 +02:00
Jürgen Mummert e204da60b6 Add German and English survey translations 2026-05-24 21:24:53 +02:00