parent
2589cad4e2
commit
d7f02d5b0b
@ -0,0 +1,46 @@
|
||||
<?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("Maths", "Web", "Mobile", "Gestion"))
|
||||
);
|
||||
$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;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue