Affiche une animation après soumission d'un formulaire
This commit is contained in:
parent
a03520f318
commit
df513938cf
14 changed files with 24 additions and 13 deletions
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">{% trans "Enregistrer" %}</button>
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">{% trans "Enregistrer" %}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer class="modal-card-foot">
|
<footer class="modal-card-foot">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="field is-grouped is-centered">
|
<div class="field is-grouped is-centered">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -92,6 +92,17 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Disable button after form submission
|
||||||
|
var $forms = document.querySelectorAll('form');
|
||||||
|
|
||||||
|
$forms.forEach($form => {
|
||||||
|
const $submit = $form.querySelector('button[type=submit]');
|
||||||
|
|
||||||
|
$form.addEventListener('submit', () => {
|
||||||
|
$submit.classList.add('is-loading');
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer class="modal-card-foot">
|
<footer class="modal-card-foot">
|
||||||
<button class="button is-fullwidth is-outlined is-primary is-light">
|
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in a new issue