Make "comment without rating" a choice in a comment dropdown
The scale form replaces the comment checkbox with a dropdown: no comment field, comment with mandatory rating, or comment alone is enough. Existing slides keep their behaviour (rating mandatory). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dbac9e93c7
commit
b496032604
8 files changed
+49
-18
No files matched your search
@@ -309,7 +309,7 @@ $countdown = function (?int $remaining): string {
|
||||
<div class="stars<?= $maxValue > 6 ? ' stars--many' : '' ?>" role="radiogroup" aria-label="<?= __('Bewertung in Sternen') ?>"<?= $slide->isPrivate() ? ' aria-describedby="private-hint"' : '' ?>>
|
||||
<?php for ($v = 1; $v <= $maxValue; $v++) : ?>
|
||||
<label class="stars__star">
|
||||
<input type="radio" name="value" value="<?= $v ?>" <?= $slide->hasComments() ? '' : 'required' ?>>
|
||||
<input type="radio" name="value" value="<?= $v ?>" <?= $slide->hasCommentOnly() ? '' : 'required' ?>>
|
||||
<span class="stars__icon" aria-hidden="true">★</span>
|
||||
<span class="sr-only"><?= __('{0} von {1} Sternen', $v, $maxValue) ?></span>
|
||||
</label>
|
||||
@@ -319,7 +319,7 @@ $countdown = function (?int $remaining): string {
|
||||
<div class="scale"<?= $slide->isPrivate() ? ' aria-describedby="private-hint"' : '' ?>>
|
||||
<?php for ($v = (int)$slide->setting('scale_min'); $v <= $maxValue; $v++) : ?>
|
||||
<label class="scale__step">
|
||||
<input type="radio" name="value" value="<?= $v ?>" <?= $slide->hasComments() ? '' : 'required' ?>>
|
||||
<input type="radio" name="value" value="<?= $v ?>" <?= $slide->hasCommentOnly() ? '' : 'required' ?>>
|
||||
<span><?= $v ?></span>
|
||||
</label>
|
||||
<?php endfor; ?>
|
||||
@@ -331,7 +331,9 @@ $countdown = function (?int $remaining): string {
|
||||
</div>
|
||||
<?php if ($slide->hasComments()) : ?>
|
||||
<label class="scale-comment" for="scale-comment"><?= __('Kommentar (optional)') ?></label>
|
||||
<p class="hint"><?= __('Du kannst auch nur einen Kommentar abgeben, ohne zu bewerten.') ?></p>
|
||||
<?php if ($slide->hasCommentOnly()) : ?>
|
||||
<p class="hint"><?= __('Du kannst auch nur einen Kommentar abgeben, ohne zu bewerten.') ?></p>
|
||||
<?php endif; ?>
|
||||
<textarea id="scale-comment" name="comment" rows="3" maxlength="500"
|
||||
placeholder="<?= __('Möchtest du deine Bewertung begründen?') ?>"></textarea>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -206,10 +206,15 @@ $optionsError = $slide->getError('options_text');
|
||||
'value' => $settings['scale_view'],
|
||||
]) ?>
|
||||
<p class="hint"><?= __('Die Auswertung in der Verwaltung und der PDF-Export enthalten immer beides.') ?></p>
|
||||
<?= $this->Form->control('settings.comments', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Kommentarfeld anzeigen (Teilnehmende können ihre Bewertung optional begründen oder auch nur einen Kommentar ohne Bewertung abgeben)'),
|
||||
'checked' => (bool)$settings['comments'],
|
||||
<?= $this->Form->control('settings.comment_mode', [
|
||||
'type' => 'select',
|
||||
'label' => __('Kommentarfeld'),
|
||||
'options' => [
|
||||
'off' => __('Kein Kommentarfeld'),
|
||||
'rating' => __('Kommentar optional, die Bewertung ist Pflicht'),
|
||||
'only' => __('Kommentar optional, auch ein Kommentar ohne Bewertung genügt'),
|
||||
],
|
||||
'value' => empty($settings['comments']) ? 'off' : (empty($settings['comment_only']) ? 'rating' : 'only'),
|
||||
]) ?>
|
||||
<p class="hint"><?= __('Die Kommentare laufen in der Präsentation nacheinander durch (nicht bei den Teilnehmenden), jeder so lange, wie man zum Lesen braucht: kurze etwa 5 Sekunden, lange bis zu 30 Sekunden. Das Tempo stellst du für die ganze Umfrage in den Einstellungen im Dashboard ein. Bei internem Feedback erst, wenn du die Ergebnisse einblendest.') ?></p>
|
||||
<?= $this->Form->control('settings.comment_ratings', [
|
||||
|
||||
Reference in new issue
Block a user