flashbag.html.twig 833 B

12345678910111213141516
  1. <div class="position-fixed top-5 end-0 p-2" style="z-index: 11">
  2. {% for type, messages in app.session.flashBag.all %}
  3. {% for message in messages %}
  4. {% if type == 'error' %}{% set type = 'danger' %} {% endif %}
  5. <div id="liveToast" class="toast bg-gradient bg-{{ type }} text-white" role="alert" aria-live="assertive" aria-atomic="true" {{ stimulus_controller('toast') }}>
  6. <div class="toast-header">
  7. <strong class="me-auto">Info</strong>
  8. <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
  9. </div>
  10. <div class="toast-body">
  11. {{ message }}
  12. </div>
  13. </div>
  14. {% endfor %}
  15. {% endfor %}
  16. </div>