templates/_notifications.html.twig line 1

Open in your IDE?
  1. <!-- Notifications -->
    <script src="{{ asset('inspinia/js/plugins/toastr/toastr.min.js') }}"></script>
    <script>
        toastr.options = {
            "closeButton": true,
            "debug": false,
            "progressBar": true,
            "preventDuplicates": true,
            "positionClass": "toast-top-center",
            "onclick": null,
            "showDuration": "400",
            "hideDuration": "1000",
            "timeOut": "5000",
            "extendedTimeOut": "5000",
            "showEasing": "swing",
            "hideEasing": "linear",
            "showMethod": "fadeIn",
            "hideMethod": "fadeOut",
            "escapeHtml": true,
        }
    </script>
    
    <script type="text/javascript">
      {% for message in app.session.getFlashBag.get('info') %}
        toastr.info("{{ message }}", "", {timeOut: 0, extendedTimeOut: 0});
      {% endfor %}
    
      {% for message in app.session.getFlashBag.get('success') %}
        toastr.success("{{ message }}", "", {timeOut: 0, extendedTimeOut: 0});
      {% endfor %}
    
      {% for message in app.session.getFlashBag.get('warning') %}
        toastr.warning("{{ message }}", "", {timeOut: 0, extendedTimeOut: 0});
      {% endfor %}
    
      {% for message in app.session.getFlashBag.get('error') %}
        toastr.error("{{ message }}", "", {timeOut: 0, extendedTimeOut: 0});
      {% endfor %}
    
    </script>