fixed modal and organization issue

This commit is contained in:
ilmedova 2023-05-03 18:16:18 +05:00
parent 99bfa39cee
commit 94742022f6
2 changed files with 12 additions and 6 deletions

View File

@ -74,12 +74,14 @@
<script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
<script>
var modal_status = 0;
const overlay = document.querySelector(".modal-overlay");
overlay.addEventListener("click", toggleModal);
var closemodal = document.querySelectorAll(".modal-close");
for (var i = 0; i < closemodal.length; i++) {
closemodal[i].addEventListener("click", toggleModal);
modal_status = 0;
}
document.onkeydown = function (evt) {
@ -93,6 +95,7 @@
if (isEscape && document.body.classList.contains("modal-active")) {
toggleModal();
}
modal_status = 0;
};
function toggleModal() {
@ -140,7 +143,10 @@ function onScanSuccess(decodedText, decodedResult) {
else{
$('#attender_consent').append("Photo and video consent: Declined");
}
toggleModal();
if(modal_status == 0){
modal_status = 1;
toggleModal();
}
}
else{
alert("Internal server error");

View File

@ -27,22 +27,22 @@
<div class="grid grid-cols-2 gap-2">
<div>
<label for="name"><b>Name and surname <span class="text-blue-600">(as on your photo ID)</span></b></label>
<input type="text" id="name" name="name" required>
<input style="color: #000" type="text" id="name" name="name" required>
</div>
<div>
<label for="ogranization"><b>Organization</b></label>
<input type="text" id="ogranization" name="ogranization">
<label for="organization"><b>Organization</b></label>
<input style="color: #000" type="text" id="organization" name="organization">
</div>
<div>
<label for="city"><b>City and country</b></label>
<input type="text" id="city" name="city" required>
<input style="color: #000" type="text" id="city" name="city" required>
</div>
<div>
<label for="email"><b>Email</b></label>
<input type="email" id="mail" name="email">
<input style="color: #000" type="email" id="mail" name="email">
</div>
</div>