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>
<nav>
<a href="recapitulatif.html" class="btn">Continuer</a>
<a href="recapitulatif.html" class="btn next">Continuer</a>
</nav>
<script src="script.js"></script>

View File

@ -27,11 +27,7 @@
<section>
<h1>Où sont mes sondages ?</h1>
<form>
<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>
<p>Vous ne savez plus où sont vos sondages ? <a href="search-poll.html">Cest par ici que ça se passe !</a></p>
</section>
</body>

View File

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

View File

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

View File

@ -49,7 +49,7 @@
</section>
<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>
</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>
</p>
<ul id="responses">
<li>
<a href="responses.html" id="add-response-choice" class="btn next">Ajouter</a>
</li>
</ul>
</section>
<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="responses.html" class="btn next">Tout effacer</a>
</nav>
<script src="script.js"></script>

View File

@ -58,16 +58,25 @@ $$('input').forEach((inputElement) => {
});
});
$("#add-response-choice").addEventListener('click', (e) => {
e.preventDefault();
let response = document.createElement("li");
let text = document.createTextNode("Blabla");
response.appendChild(text);
if($("#add-response-choice")) {
$("#add-response-choice").addEventListener('click', (e) => {
e.preventDefault();
let response = document.createElement("li");
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")) {
type_sondage.addEventListener('change', function() {
let typeSondage = this.options[this.selectedIndex].text;
@ -78,7 +87,6 @@ if(document.getElementById("type_sondage")) {
localStorage.setItem('type_sondage', 'dates');
$('#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>