<script>
{% for type, messages in app.flashes() %}
{% for message in messages %}
$.notify({
message: "{{ message }}"
}, {
// settings
type: "{{ type }}",
placement: {
from: "top",
align: "right",
},
delay: 5000,
timer: 1000,
animate: {
enter: 'animate__animated animate__fadeIn',
exit: 'animate__animated animate__fadeOutRight'
},
});
{% endfor %}
{% endfor %}
{% if form is defined and not form.vars.valid %}
$.notify({
message: "<strong>Erreur lors de la validation!</strong><br>Merci de vérifier les champs en rouge"
}, {
// settings
type: "danger",
placement: {
from: "top",
align: "right",
},
delay: 5000,
timer: 1000,
animate: {
enter: 'animate__animated animate__fadeIn',
exit: 'animate__animated animate__fadeOutRight'
},
});
{% endif %}
</script>