to fetch code on my second computer
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
907c68e282
commit
e7e2fd4e97
@ -0,0 +1,118 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<?php
|
||||||
|
global $googleApis, $googleStatic, $poppins, $icon, $logoUCA;
|
||||||
|
?>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="stylesheet" href="Views/CSS/base.css" />
|
||||||
|
<link rel="preconnect" href="<?php echo $googleApis; ?>">
|
||||||
|
<link rel="preconnect" href="<?php echo $googleStatic; ?>" crossorigin>
|
||||||
|
<link href="<?php echo $poppins; ?>" rel="stylesheet">
|
||||||
|
<title>Formulaire de témoignage</title>
|
||||||
|
<link rel="shortcut icon" href="<?php echo $icon; ?>" type="image/x-icon">
|
||||||
|
<link rel="icon" href="<?php echo $icon; ?>" type="image/x-icon">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<img id="logoUCA" src="<?php echo $logoUCA; ?>" height="35px" width="auto" alt="logo UCA">
|
||||||
|
<h1>Administration</h1>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<form method="post">
|
||||||
|
<label for="keyword">Écrivez la catégorie : </label>
|
||||||
|
<input id="keyword" name="keyword" type="text" size="50">
|
||||||
|
<input type="submit" value="Ajouter">
|
||||||
|
<input type="hidden" name="action" value="addKeyword">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Ajouter une question :</h2>
|
||||||
|
<form method="post">
|
||||||
|
|
||||||
|
<label for="question">Écrivez la question : </label>
|
||||||
|
<br>
|
||||||
|
<input id="question" name="question" type="text" size="100">
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<label for="type">Séléctionnez le type de question souhaitée :
|
||||||
|
<br>- Text permet à l'utilisateur d'écrire lui même la réponse.
|
||||||
|
<br>- ListBox permet à l'utilisateur de choisir une réponse parmi plusieurs possibilités.
|
||||||
|
<br>- CheckBox permet à l'utilisateur de choisir une ou plusieurs réponses parmi plusieurs possibilités.
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<select id="type" name="type">
|
||||||
|
<option value="BusinessClass\ListBoxQuestion">ListBox</option>
|
||||||
|
<option value="BusinessClass\CheckBoxQuestion">CheckBox</option>
|
||||||
|
<option value="BusinessClass\TextQuestion">Text</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<label for="responses">Écrivez la liste des réponses possibles en les séparant comme cela :
|
||||||
|
<br>Réponse1; Réponse2; Réponse3;
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<input id="responses" name="responses" type="text" size="100">
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<label for="categories">Écrivez la liste des catégories associée à chaque question comme cela :
|
||||||
|
<br>Catégorie1.1,Catégorié1.2; Catégorie2.1; Catégorié3.1,Catégorie3.2,Catégorie3.3;
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<input id="categories" name="categories" type="text" size="100">
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<input type="submit" value="Confirmer">
|
||||||
|
<input type="hidden" name="action" value="addQuestion">
|
||||||
|
</form>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<div style="text-align: center">
|
||||||
|
<form method="post"
|
||||||
|
|
||||||
|
<input name="type" type="hidden" value="<?php echo $type; ?>">
|
||||||
|
<input name="question" type="hidden" value="<?php echo $questionContent; ?>">
|
||||||
|
<p>Votre question : <?php echo $questionContent; ?></p>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<label>Entrez une réponse : </label>
|
||||||
|
<input name="responses" type="text" size="50">
|
||||||
|
<br><br><br>
|
||||||
|
<label>Séléctionnez les catégories associées à cette réponse : </label>
|
||||||
|
<br><br>
|
||||||
|
<?php
|
||||||
|
foreach ($categories as $category) {
|
||||||
|
?>
|
||||||
|
<label><?php echo $category ?></label>
|
||||||
|
<input type="checkbox" name="categories[]" value="<?php echo $category ?>">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<input type="submit" value="Ajouter la réponse">
|
||||||
|
<input type="hidden" name="action" value="addResponse">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let responsesAndCategories = new Map();
|
||||||
|
|
||||||
|
function addResponse() {
|
||||||
|
const response = document.querySelector('#response');
|
||||||
|
const categories = document.querySelectorAll(".categories");
|
||||||
|
responsesAndCategories.set(response.value, categories.forEach(category => console.log(category.value)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const addPossiblesResponsesButton = document.querySelector('#addNewResponse');
|
||||||
|
addPossiblesResponsesButton.addEventListener('click', addResponse);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in new issue