You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.6 KiB
47 lines
1.6 KiB
<?php
|
|
|
|
namespace Model;
|
|
|
|
use BusinessClass\CheckBoxQuestion;
|
|
use BusinessClass\Form;
|
|
use BusinessClass\ListBoxQuestion;
|
|
use BusinessClass\TextQuestion;
|
|
use BusinessClass\YesNoQuestion;
|
|
|
|
class ModelCandidate
|
|
{
|
|
public function submitForm(): void
|
|
{
|
|
// TODO: Implement submitForm() method.
|
|
}
|
|
|
|
public function getForm(): string
|
|
{
|
|
/* TEMPORAIRE */
|
|
$title = "Formulaire de candidature à un témoignage";
|
|
$description = "Ce formulaire vous permet de candidater à un potentiel témoignage vidéo.";
|
|
$questions = array(
|
|
new TextQuestion("Décrivez-nous votre parcours en quelques lignes :", array(null)),
|
|
new YesNoQuestion("Êtes-vous originaire de Clermont et ses alentours ? (- de 2 heures de trajet)", array("Origine")),
|
|
new ListBoxQuestion(array("BAC Général", "BAC Pro", "Étude supérieure"), "Quel étude avez-vous réalisé avant l'IUT?", array("Général", "Pro", "EtudSupp")),
|
|
new CheckBoxQuestion(array("Mathématiques", "Web", "Mobile", "Gestion"), "Quels matières appréciez-vous ?", array(array("Maths", "Maths2", "Maths3"), array("Web"), array(""), array("Gestion", "Gestion2")))
|
|
);
|
|
$form = new Form($title, $description, $questions);
|
|
/* ---------- */
|
|
|
|
$html = "<h1>$title</h1>
|
|
<h3>$description</h3>
|
|
<div id='container_form'>
|
|
<form>";
|
|
|
|
foreach ($questions as $question)
|
|
{
|
|
$html.= $question->printStrategy();
|
|
}
|
|
|
|
$html.= "</form>
|
|
</div>";
|
|
|
|
return $html;
|
|
}
|
|
} |