Add optional comment field to multiple choice slides
CI / Deploy / PHP 8.4 (push) Successful in 1m11s
CI / Deploy / PHP 8.5 (push) Successful in 1m11s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Participants can justify their choice; the comment is stored once in the
first response row, rotates on the stage like scale comments and is listed
in the admin area and the PDF export.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-13 09:29:25 +01:00
1 parent 28bfd535f4
commit 61718ed7c6
14 files changed
+330 -29

No files matched your search

+8 -1
View File
@@ -266,7 +266,9 @@ $countdown = function (?int $remaining): string {
aria-describedby="edit-text-hint"><?= h((string)$ownText) ?></textarea>
<p class="hint" id="edit-text-hint"><?= $isOpen
? __('Möglich, solange die Abstimmung läuft.')
: __('Möglich, solange die Abstimmung läuft. Ein leeres Feld entfernt deinen Kommentar, deine Bewertung bleibt.') ?></p>
: ($slide->type === 'choice'
? __('Möglich, solange die Abstimmung läuft. Ein leeres Feld entfernt deinen Kommentar, deine Auswahl bleibt.')
: __('Möglich, solange die Abstimmung läuft. Ein leeres Feld entfernt deinen Kommentar, deine Bewertung bleibt.')) ?></p>
<?= $this->Form->button($isOpen ? __('Antwort speichern') : __('Kommentar speichern'), ['class' => 'button button--primary button--block']) ?>
<?= $this->Form->end() ?>
</details>
@@ -290,6 +292,11 @@ $countdown = function (?int $remaining): string {
</label>
<?php endforeach; ?>
</div>
<?php if ($slide->hasComments()) : ?>
<label class="scale-comment" for="choice-comment"><?= __('Kommentar (optional)') ?></label>
<textarea id="choice-comment" name="comment" rows="3" maxlength="500"
placeholder="<?= __('Möchtest du deine Auswahl begründen?') ?>"></textarea>
<?php endif; ?>
<?php elseif ($slide->type === 'open') : ?>
<textarea name="text" rows="4" maxlength="500" required