mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-09 07:33:19 -06:00
Ensure that closing the alert box on the login page will close multiple alert boxes if opened.
This commit is contained in:
parent
e8b81db977
commit
92858e40bf
@ -2,7 +2,7 @@
|
||||
{% 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" id="alertbox">
|
||||
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
|
||||
{{ message }}
|
||||
<button onclick="hide()" type="button" class="close" data-dismiss="alert" aria-label="{{ _('Close') }}"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
@ -11,7 +11,10 @@
|
||||
</div>
|
||||
<script>
|
||||
function hide(){
|
||||
document.getElementById("alertbox").classList.remove("show");
|
||||
var target = event.target || event.srcElement;
|
||||
if (target.type === undefined)
|
||||
target=target.parentNode;
|
||||
target.parentNode.classList.remove("show");
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user