Recherche de sondate en deux temps

This commit is contained in:
Yannick Francois 2018-10-26 22:07:05 +02:00
parent ee2dfb7002
commit 55ca50890f
9 changed files with 97 additions and 20 deletions

View File

@ -30,7 +30,7 @@
</section> </section>
<nav> <nav>
<a href="recapitulatif.html" class="btn">Continuer</a> <a href="recapitulatif.html" class="btn next">Continuer</a>
</nav> </nav>
<script src="script.js"></script> <script src="script.js"></script>

View File

@ -27,11 +27,7 @@
<section> <section>
<h1>Où sont mes sondages ?</h1> <h1>Où sont mes sondages ?</h1>
<form> <p>Vous ne savez plus où sont vos sondages ? <a href="search-poll.html">Cest par ici que ça se passe !</a></p>
<label for="email">Je cherche les sondages qui correspondent à l'e-mail</label>
<input type="email" name="email" id="email" value="monemai@example.com" class="nfl-textfield">.
<input type="submit" value="Retrouver mes sondages">
</form>
</section> </section>
</body> </body>

View File

@ -70,8 +70,8 @@
</section> </section>
<nav> <nav>
<a href="validations.html" class="btn">Continuer</a> <a href="validations.html" class="btn next">Continuer</a>
<a href="dates.html" class="btn">Modifier</a> <a href="dates.html" class="btn next">Modifier</a>
</nav> </nav>
<script src="script.js"></script> <script src="script.js"></script>

View File

@ -35,7 +35,7 @@
</section> </section>
<nav> <nav>
<a href="responses.html" class="btn" id="next">Continuer</a> <a href="responses.html" class="btn next" id="next">Continuer</a>
</nav> </nav>
</body> </body>

View File

@ -49,7 +49,7 @@
</section> </section>
<nav> <nav>
<a href="notifications.html" class="btn">Continuer</a> <a href="notifications.html" class="btn next">Continuer</a>
<a href="dates.html" class="btn">Modifier</a> <a href="dates.html" class="btn">Modifier</a>
</nav> </nav>

View File

@ -0,0 +1,37 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="referrer" content="same-origin">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Framadate</title>
<meta name="description" content=" ">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link crossorigin="anonymous" rel="stylesheet" href="https://rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap-reboot.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<section>
<h1>Les réponses</h1>
<ul id="responses">
<li>
</li>
</ul>
</section>
<nav>
<a href="recapitulatif.html" class="btn next">Continuer</a>
</nav>
<script src="script.js"></script>
</body>
</html>

View File

@ -28,14 +28,16 @@
</select> </select>
</p> </p>
<ul id="responses"> <ul id="responses">
<li>
<a href="responses.html" id="add-response-choice" class="btn next">Ajouter</a>
</li>
</ul> </ul>
</section> </section>
<nav> <nav>
<a href="responses.html" id="add-response-choice" class="btn next">Ajouter</a>
<a href="responses.html" class="btn next">Tout effacer</a>
<a href="recapitulatif.html" class="btn next">Continuer</a> <a href="recapitulatif.html" class="btn next">Continuer</a>
<a href="responses.html" class="btn next">Tout effacer</a>
</nav> </nav>
<script src="script.js"></script> <script src="script.js"></script>

View File

@ -58,16 +58,25 @@ $$('input').forEach((inputElement) => {
}); });
}); });
$("#add-response-choice").addEventListener('click', (e) => { if($("#add-response-choice")) {
e.preventDefault(); $("#add-response-choice").addEventListener('click', (e) => {
let response = document.createElement("li"); e.preventDefault();
let text = document.createTextNode("Blabla"); let response = document.createElement("li");
response.appendChild(text); let text = document.createTextNode("Blabla");
response.appendChild(text);
$("#responses").appendChild(response); $("#responses").appendChild(response);
});
}
$$(".next").forEach((button) => {
button.addEventListener("click", (e) => {
$$(".toggle-field").forEach((field) => {
localStorage.setItem(field.id, field.innerText);
});
});
}); });
if(document.getElementById("type_sondage")) { if(document.getElementById("type_sondage")) {
type_sondage.addEventListener('change', function() { type_sondage.addEventListener('change', function() {
let typeSondage = this.options[this.selectedIndex].text; let typeSondage = this.options[this.selectedIndex].text;
@ -78,7 +87,6 @@ if(document.getElementById("type_sondage")) {
localStorage.setItem('type_sondage', 'dates'); localStorage.setItem('type_sondage', 'dates');
$('#next').href = "dates.html"; $('#next').href = "dates.html";
} }
debugStorage()
}) })
} }
@ -89,3 +97,4 @@ if(document.getElementById("startButton")) {
}); });
} }
debugStorage();

33
public/search-poll.html Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="referrer" content="same-origin">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Framadate</title>
<meta name="description" content=" ">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link crossorigin="anonymous" rel="stylesheet" href="https://rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap-reboot.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<section>
<h1>Où sont mes sondages ?</h1>
<form>
<label>
votre courriel
<input type="email" name="email" value="">
<button type="submit">Envoyer mes sondages</button>
</label>
</form>
</section>
</body>
<script src="script.js"></script>
</html>