ajoute un bouton pour ajouter des horaires

This commit is contained in:
Yannick Francois 2019-03-21 14:26:56 +01:00
parent a5f3e96ad1
commit 9c27b43d3b
2 changed files with 7 additions and 2 deletions

View File

@ -66,6 +66,7 @@
<button class="remove btn-no-style"><i class="fas fa-trash-alt"></i></button>
</li>
</ul>
<button class="horaire-identique" style="display:none" id="addDateButton">Ajouter un horaire</button>
</section>

View File

@ -121,10 +121,14 @@ if($('#ajouterDesHoraires')) {
ajouterDesHoraires.addEventListener('change', () => {
if (ajouterDesHoraires.value == 'avec des') {
identiquesDifferentsPourChaqueJour.style.display = 'inline'
$('.horaire-identique').style.display = 'inline'
$$('.horaire-identique').forEach((e) => {
e.style.display = 'inline'
});
} else {
identiquesDifferentsPourChaqueJour.style.display = 'none'
$('.horaire-identique').style.display = 'none'
$$('.horaire-identique').forEach((e) => {
e.style.display = 'none'
});
}
});
}