templates/back/_common/flash.html.twig line 1

Open in your IDE?
  1. <script>
  2. {% for type, messages in app.flashes() %}
  3. {% for message in messages %}
  4. $.notify({
  5. message: "{{ message|trans }}"
  6. }, {
  7. // settings
  8. type: "{{ type }}",
  9. placement: {
  10. from: "top",
  11. align: "right",
  12. },
  13. delay: 5000,
  14. timer: 1000,
  15. animate: {
  16. enter: 'animate__animated animate__fadeIn',
  17. exit: 'animate__animated animate__fadeOutRight'
  18. },
  19. });
  20. {% endfor %}
  21. {% endfor %}
  22. {% if form is defined and not form.vars.valid %}
  23. $.notify({
  24. message: `<strong>{{ 'erreur lors de la validation!'|trans }}</strong><br>{{ 'merci de vérifier les champs en rouge'|trans }}`
  25. }, {
  26. // settings
  27. type: "danger",
  28. placement: {
  29. from: "top",
  30. align: "right",
  31. },
  32. delay: 5000,
  33. timer: 1000,
  34. animate: {
  35. enter: 'animate__animated animate__fadeIn',
  36. exit: 'animate__animated animate__fadeOutRight'
  37. },
  38. });
  39. {% endif %}
  40. </script>