From 34d7e205673aae7da264a4adba07cfc0ab6eba49 Mon Sep 17 00:00:00 2001 From: Patrick Niebeling Date: Thu, 12 Nov 2026 22:34:21 +0100 Subject: [PATCH] Show two answer rows by default for quiz and order slides Only two entries are required, so the form no longer offers four empty rows up front; further rows come via the add button. Co-Authored-By: Claude Sonnet 5.5 --- templates/Slides/form.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/Slides/form.php b/templates/Slides/form.php index bd0fe10..1981b98 100644 --- a/templates/Slides/form.php +++ b/templates/Slides/form.php @@ -214,8 +214,8 @@ $optionsError = $slide->getError('options_text'); type === 'quiz') : $quizError = $slide->getError('quiz_options'); $rows = $quizOptions; - // Always offer a few empty rows (more via "Antwort hinzufügen" with JS). - $rowCount = min(\App\Model\Table\SlidesTable::MAX_QUIZ_OPTIONS, max(4, count($rows) + 1)); + // Offer the two required rows (more via "Antwort hinzufügen" with JS), plus one spare when editing. + $rowCount = min(\App\Model\Table\SlidesTable::MAX_QUIZ_OPTIONS, max(2, count($rows) + 1)); $rows = array_pad($rows, $rowCount, ['label' => '', 'correct' => false]); ?>
getError('options_text'); isOrder()) : $orderError = $slide->getError('order_options'); $max = \App\Model\Table\SlidesTable::MAX_ORDER_OPTIONS; - $rows = array_pad($orderOptions, min($max, max(4, count($orderOptions) + 1)), ''); + $rows = array_pad($orderOptions, min($max, max(2, count($orderOptions) + 1)), ''); ?>