

{% if messages %}
            
            {% for message in messages  %}
                
                {% if message.level == DEFAULT_MESSAGE_LEVELS.SUCCESS %}
                    <div class="notification is-warning mx-6 is-justify-content-centered" >
                    <button class="delete" onclick="delNotif()"></button>
                        {{message}}
                    </div>
                {% endif %}

                {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}
                    <div class="notification has-text-centered is-light is-danger mt-1 mx-6 is-justify-content-centered">
                    <button class="delete" onclick="delNotif()"></button>
                        {{message}}
                    </div>
                {% endif %}
            
            {% endfor %}

        {% endif %}


<script type="text/javascript">
    function delNotif(){
        tabcontent = document.getElementsByClassName("notification");
  
        for (i = 0; i < tabcontent.length; i++) {
            tabcontent[i].style.display = "none";
            
        }
    }

    setTimeout(delNotif,2000)
</script>