|
|
|
@ -2,10 +2,19 @@
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
titreKahoot:"",
|
|
|
|
|
nbQuestions:0,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
|
|
|
|
|
// TODO : demander a l'api de creer un kahoot (et rediriger vers la partie si possible via HATEOAS)
|
|
|
|
|
creerKahoot: function(){
|
|
|
|
|
console.log("yay")
|
|
|
|
|
//this.titreKahoot et this.nbQuestions synchronisés avec v-model
|
|
|
|
|
console.log(this.titreKahoot)
|
|
|
|
|
console.log(this.nbQuestions)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
@ -58,20 +67,20 @@ export default {
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h2 class="modal-title" id="creationKahoot">Créer un Kahoot</h2> <!-- TODO : Il faut changer le formulaire pour juste cliquer sur un bouton et que ça affiche une pop-up -->
|
|
|
|
|
</div>
|
|
|
|
|
<form>
|
|
|
|
|
<form @submit.prevent>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div>
|
|
|
|
|
<label for="Kahoot-Create-Title">Titre</label>
|
|
|
|
|
<input type="text" id="Kahoot-Create-Title" name="Kahoot-Create-Title">
|
|
|
|
|
<input type="text" id="Kahoot-Create-Title" name="Kahoot-Create-Title" v-model="titreKahoot">
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<label for="Kahoot-Create-Questions">Nombre de questions</label>
|
|
|
|
|
<input type="number" id="Kahoot-Create-Questions" name="Kahoot-Create-Questions">
|
|
|
|
|
<input type="number" id="Kahoot-Create-Questions" name="Kahoot-Create-Questions" v-model="nbQuestions">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
|
|
|
|
|
<button class="btn btn-primary">Créer</button>
|
|
|
|
|
<button class="btn btn-primary" v-on:click="creerKahoot">Créer</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|