mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
Bifurcation sur le sondate en fonction du choix
This commit is contained in:
parent
b3b9797e8c
commit
0f6abfa7b9
@ -33,17 +33,7 @@
|
|||||||
<a href="recapitulatif.html" class="btn">Continuer</a>
|
<a href="recapitulatif.html" class="btn">Continuer</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<script>
|
<script src="script.js"></script>
|
||||||
window.onload = () => {
|
|
||||||
console.log("truc");
|
|
||||||
var monStockage = localStorage;
|
|
||||||
console.log("key ? storage : ", localStorage.type_sondage);
|
|
||||||
|
|
||||||
document.querySelector('#type_sondage').addEventListener('change', function() {
|
|
||||||
localStorage.setItem('type_sondage', this.options[this.selectedIndex].text);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -36,5 +36,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -73,6 +73,8 @@
|
|||||||
<a href="validations.html" class="btn">Continuer</a>
|
<a href="validations.html" class="btn">Continuer</a>
|
||||||
<a href="dates.html" class="btn">Modifier</a>
|
<a href="dates.html" class="btn">Modifier</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -20,14 +20,14 @@
|
|||||||
<section>
|
<section>
|
||||||
<p>
|
<p>
|
||||||
Je m'appelle
|
Je m'appelle
|
||||||
<input name="nom" />
|
<input name="nom" data-group="record" />
|
||||||
et le titre de ce sondage
|
et le titre de ce sondage
|
||||||
<select id="type_sondage">
|
<select id="type_sondage" data-group="record">
|
||||||
<option>classique</option>
|
<option>classique</option>
|
||||||
<option>special dates</option>
|
<option>special dates</option>
|
||||||
</select>
|
</select>
|
||||||
est
|
est
|
||||||
<input name="titre" />.
|
<input name="titre" data-group="record"/>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Si je devais le décrire pour les autres personnes, je dirais
|
Si je devais le décrire pour les autres personnes, je dirais
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
<a href="notifications.html" class="btn">Continuer</a>
|
<a href="notifications.html" class="btn">Continuer</a>
|
||||||
<a href="dates.html" class="btn">Modifier</a>
|
<a href="dates.html" class="btn">Modifier</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -39,11 +39,7 @@
|
|||||||
<a href="recapitulatif.html" class="btn next">Continuer</a>
|
<a href="recapitulatif.html" class="btn next">Continuer</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<script>
|
<script src="script.js"></script>
|
||||||
window.onload = () => {
|
|
||||||
var monStockage = localStorage;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
var monStockage = localStorage;
|
if(localStorage.getItem('type_sondage') == null) {
|
||||||
if(localStorage.getItem('type_sondage') == undefined) {
|
|
||||||
localStorage.setItem('type_sondage', 'classique');
|
localStorage.setItem('type_sondage', 'classique');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector('#type_sondage').addEventListener('change', function() {
|
console.debug(localStorage)
|
||||||
const selectedType = this.options[this.selectedIndex].text;
|
|
||||||
localStorage.setItem('type_sondage', type_sondage);
|
let typeSondageElement = document.querySelectorAll("*[data-group='record']")
|
||||||
console.log(selectedType);
|
typeSondageElement.forEach((currentElement) => {
|
||||||
if(selectedType == "classique") {
|
currentElement.addEventListener('change', function() {
|
||||||
document.querySelector('#next').href = "reponses.html";
|
const selectedType = this.options[this.selectedIndex].text;
|
||||||
} else {
|
localStorage.setItem('type_sondage', type_sondage);
|
||||||
document.querySelector('#next').href = "dates.html";
|
if(selectedType == "classique") {
|
||||||
}
|
document.querySelector('#next').href = "reponses.html";
|
||||||
console.log(document.querySelector('#next'))
|
} else {
|
||||||
})
|
document.querySelector('#next').href = "dates.html";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,10 +21,7 @@
|
|||||||
<h1>C'est tout bon !</h1>
|
<h1>C'est tout bon !</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user