Add internal feedback and comments to choice slides
Same options as for scales: "private" shows only the number of votes on the stage, "comments" adds an optional comment field whose comments rotate in the presentation, "comment_ratings" shows the chosen answer(s) next to each comment. With multiple choice the comment is stored on the participant's first row. Settings and participant fields are shared elements for scale and choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e09906830
commit
547b564e32
18 files changed
+485
-108
No files matched your search
@@ -217,7 +217,7 @@ $countdown = function (?int $remaining): string {
|
||||
<?php if ($slide->type === 'choice') :
|
||||
$multiple = (bool)$slide->setting('multiple'); ?>
|
||||
<?php if ($multiple) : ?><p class="hint"><?= __('Mehrfachauswahl möglich') ?></p><?php endif; ?>
|
||||
<div class="choices">
|
||||
<div class="choices"<?= $slide->isPrivate() ? ' aria-describedby="private-hint"' : '' ?>>
|
||||
<?php foreach ($slide->slide_options as $option) : ?>
|
||||
<label class="choice">
|
||||
<input type="<?= $multiple ? 'checkbox' : 'radio' ?>"
|
||||
@@ -227,6 +227,7 @@ $countdown = function (?int $remaining): string {
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?= $this->element('feedback_fields', ['slide' => $slide, 'placeholder' => __('Möchtest du deine Wahl begründen?')]) ?>
|
||||
|
||||
<?php elseif ($slide->type === 'open') : ?>
|
||||
<textarea name="text" rows="4" maxlength="500" required
|
||||
@@ -251,16 +252,7 @@ $countdown = function (?int $remaining): string {
|
||||
<span><?= h((string)$slide->setting('min_label')) ?></span>
|
||||
<span><?= h((string)$slide->setting('max_label')) ?></span>
|
||||
</div>
|
||||
<?php if ($slide->hasComments()) : ?>
|
||||
<label class="scale-comment" for="scale-comment"><?= __('Kommentar (optional)') ?></label>
|
||||
<textarea id="scale-comment" name="comment" rows="3" maxlength="500"
|
||||
placeholder="<?= __('Möchtest du deine Bewertung begründen?') ?>"></textarea>
|
||||
<?php endif; ?>
|
||||
<?php if ($slide->isPrivate()) : ?>
|
||||
<p class="hint private-hint" id="private-hint">
|
||||
🔒 <?= __('Internes Feedback: Das Ergebnis wird nicht öffentlich angezeigt und deine Bewertung nicht mit deinem Namen gespeichert.') ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?= $this->element('feedback_fields', ['slide' => $slide, 'placeholder' => __('Möchtest du deine Bewertung begründen?')]) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->Form->button(__('Absenden'), ['class' => 'button button--primary button--block']) ?>
|
||||
|
||||
Reference in new issue
Block a user