diff --git a/Source/BusinessClass/CheckBoxQuestion.php b/Source/BusinessClass/CheckBoxQuestion.php index ef132e8..093df04 100644 --- a/Source/BusinessClass/CheckBoxQuestion.php +++ b/Source/BusinessClass/CheckBoxQuestion.php @@ -26,17 +26,17 @@ class CheckBoxQuestion extends BoxQuestion $categories = $this->getCategories(); $html = "\t\t\t
- \n"; + \n"; for ($i = 0; $i < count($possibleResponses); $i++) { $categoriesSplit = $possibleResponses[$i]."||"; foreach ($categories[$i] as $category) { $categoriesSplit.= $category."_"; } - $html.= "\t\t\t\t + $html.= "\t\t\t\t
  • \n"; } - $html.= "\t\t\t
  • \n"; + $html.= "\t\t\t
    \n"; return $html; } diff --git a/Source/BusinessClass/ListBoxQuestion.php b/Source/BusinessClass/ListBoxQuestion.php index f23df5e..3ed692a 100644 --- a/Source/BusinessClass/ListBoxQuestion.php +++ b/Source/BusinessClass/ListBoxQuestion.php @@ -26,8 +26,8 @@ class ListBoxQuestion extends BoxQuestion $categories = $this->getCategories(); $html = "\t\t\t
    - - \n"; for ($i = 0; $i < count($possibleResponses); $i++) { $categoriesSplit = $possibleResponses[$i]."||"; @@ -37,7 +37,7 @@ class ListBoxQuestion extends BoxQuestion $html.= "\t\t\t\t\t\n"; } $html.= "\t\t\t\t -
    \n"; +
    \n"; return $html; } diff --git a/Source/BusinessClass/TextQuestion.php b/Source/BusinessClass/TextQuestion.php index 1327836..78d0f2f 100644 --- a/Source/BusinessClass/TextQuestion.php +++ b/Source/BusinessClass/TextQuestion.php @@ -18,8 +18,8 @@ class TextQuestion extends Question $id = $this->getId(); return "\t\t\t
    - - -
    \n"; + +
    +
    \n"; } } diff --git a/Source/Model/ModelCandidate.php b/Source/Model/ModelCandidate.php index 9485f7b..559f24f 100644 --- a/Source/Model/ModelCandidate.php +++ b/Source/Model/ModelCandidate.php @@ -20,8 +20,8 @@ class ModelCandidate public function submitForm(): void { $answersAndCategories = $_POST['answers']; - $dataIds = null; + $dataIds = null; if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'submitForm') { $dataIdsJson = $_POST['data_ids']; $dataIds = json_decode($dataIdsJson); @@ -61,11 +61,17 @@ class ModelCandidate $description = $form[0]['description']; $questionsTab = (new GatewayQuestion())->getAllQuestions($form[0]['id']); + $questions = Factory::getBuiltObjects($questionsTab, "Question"); + $nbQuestions = count($questions); + $time = round(($nbQuestions * 20)/60); $html = "

    $title

    \n +

    $description

    \n +
    +

    Temps estimé : $time minutes

    \n
    \n"; @@ -74,11 +80,11 @@ class ModelCandidate } if (count($questions) > 0) { - $html.= "\t\t\t\n + $html.= "\t\t\t\n \t\t\t \t\t\t \t\t
    \n -\t
    \n"; +\t


    \n"; } else { $html.= "\t\t\n \t\n"; diff --git a/Source/Views/CSS/form.css b/Source/Views/CSS/form.css index 7173841..5c4cf56 100644 --- a/Source/Views/CSS/form.css +++ b/Source/Views/CSS/form.css @@ -1,18 +1,27 @@ +h3 { + text-align: center; +} + +h4 { + text-align: center; + font-weight: normal; +} + #container_form { display: flex; flex-direction: row; justify-content: center; - margin-top: 5%; + margin-top: 3%; } #container_form h2{ padding-top: 1%; } -#container_form #button { +#button { margin-top: 5%; - width: 20%; - height: 5%; + width: 15%; + height: 3%; margin-left: 79%; margin-bottom: 10%; cursor: pointer; @@ -21,8 +30,8 @@ border-radius: 20px; } -#container_form #button:hover { - background-color: rgb(23,143,150); +#button:hover { + background-color: rgba(23, 143, 150, 0.7); } #container_testimony, #container_personalInfos { diff --git a/Source/Views/HTML/possibleResponsesForm.php b/Source/Views/HTML/possibleResponsesForm.php index ad8188a..6578ce9 100644 --- a/Source/Views/HTML/possibleResponsesForm.php +++ b/Source/Views/HTML/possibleResponsesForm.php @@ -36,7 +36,7 @@ - +