Fixed an issue where clicking on the cross button of the alert box on the login page is not working. Fixes #4033

This commit is contained in:
Yogesh Jain
2020-05-12 17:15:30 +05:30
committed by Akshay Joshi
parent 8ec1d4c9eb
commit dba5761ad0
2 changed files with 8 additions and 2 deletions

View File

@@ -2,12 +2,17 @@
{% if messages %}
<div style="position: fixed; top: 20px; right: 20px; width: 400px; z-index: 9999">
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert" id="alertbox">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="{{ _('Close') }}"><span
<button onclick="hide()" type="button" class="close" data-dismiss="alert" aria-label="{{ _('Close') }}"><span
aria-hidden="true">&times;</span></button>
</div>
{% endfor %}
</div>
<script>
function hide(){
document.getElementById("alertbox").classList.remove("show");
}
</script>
{% endif %}
{%- endwith %}