From 7ea49fc315f838f3d0bd2bad035c80a8d4c2ad22 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 9 Nov 2023 11:54:05 +0100 Subject: [PATCH] wip #6463 @0.5 --- app/SubForms/Quiz/Answer.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/SubForms/Quiz/Answer.php b/app/SubForms/Quiz/Answer.php index 49dd24680..73b152716 100644 --- a/app/SubForms/Quiz/Answer.php +++ b/app/SubForms/Quiz/Answer.php @@ -34,8 +34,8 @@ class Answer extends SubForm 'when' => ['type' => ['match']], ]); - $gauche=__('gauche'); - $droite=__('droite'); + $gauche = __('gauche'); + $droite = __('droite'); $this->addField(['name' => 'drop_area', 'type' => SelectFromArray::class, @@ -44,7 +44,7 @@ class Answer extends SubForm 'allows_null' => false, 'default' => '1', 'options' => [ - '1' => __('Zone :zone (:side)', ['zone' => 1, 'side' =>$gauche]), + '1' => __('Zone :zone (:side)', ['zone' => 1, 'side' => $gauche]), '2' => __('Zone :zone (:side)', ['zone' => 2, 'side' => $droite]) ] ]); @@ -55,10 +55,9 @@ class Answer extends SubForm 'when' => ['type' => ['multiple']], ]); - $this->addField(['name' => 'score', - 'type' => Integer::class, - 'label' => __('Score'), + $this->addField('score', Integer::class, __('Score'), [ 'default' => 1, - 'when' => ['type' => ['multiple']]]); + 'when' => ['type' => ['multiple'], 'multiple' => 1] + ]); } } -- 2.39.5