Drop the image description field
CI / Deploy / PHP 8.4 (push) Successful in 1m36s
CI / Deploy / PHP 8.5 (push) Successful in 1m36s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Slide images are shown on the presenter's screen, so a description for
screen readers is not asked for any more. The column stays (always empty).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-21 13:35:48 +01:00
1 parent ebaf6fbe53
commit 7a80794ded
12 files changed
+110 -35

No files matched your search

+17 -3
View File
@@ -179,9 +179,14 @@ class VoteService
default => __('Bitte gib zuerst deine Bewertung ab.'),
});
}
if ($slide->type === Slide::TYPE_SCALE && $row->numeric_value === null && $text === null) {
// Without a rating the comment is the whole answer.
throw new VoteException(__('Ohne Bewertung darf der Kommentar nicht leer sein.'));
$withoutAnswer = match ($slide->type) {
Slide::TYPE_SCALE => $row->numeric_value === null,
Slide::TYPE_CHOICE => $row->slide_option_id === null,
default => false,
};
if ($withoutAnswer && $text === null) {
// Without a rating or selection the comment is the whole answer.
throw new VoteException(__('Ohne Bewertung oder Auswahl darf der Kommentar nicht leer sein.'));
}
$row->text_value = $text;
$this->Responses->saveOrFail($row);
@@ -285,6 +290,15 @@ class VoteService
$validIds = $slide->optionIds();
$selected = array_values(array_intersect($selected, $validIds));
if ($selected === [] && $slide->hasCommentOnly()) {
// Comment only: no selection, but a comment is required (this is not a way to skip).
$comment = self::comment($data);
if ($comment === null) {
throw new VoteException(__('Bitte wähle eine Antwort aus oder schreibe einen Kommentar.'));
}
return [['slide_option_id' => null, 'text_value' => $comment]];
}
if ($selected === []) {
throw new VoteException(__('Bitte wähle eine Antwort aus.'));
}