119 lines
4.7 KiB
PHP
Executable File
119 lines
4.7 KiB
PHP
Executable File
<!-- leave modal -->
|
|
<!-- styling -->
|
|
<style type="text/css">
|
|
.modal-leave-iframe{
|
|
background: rgba(255,255,255,0.8) !important;
|
|
}
|
|
.modal-leave-iframe .modal-content{
|
|
box-shadow: 1px 2px 10px rgba(0,0,0,0.1),
|
|
-1px -2px 10px rgba(0,0,0,0.1);
|
|
border: none;
|
|
border-radius: 10px;
|
|
}
|
|
@media (min-width: 576px){
|
|
.modal-leave-iframe .modal-dialog{
|
|
width: 560px;
|
|
max-width: revert !important;
|
|
}
|
|
}
|
|
.modal-leave-iframe .modal-header,
|
|
.modal-leave-iframe .modal-body,
|
|
.modal-leave-iframe .modal-footer{
|
|
padding: unset;
|
|
}
|
|
.modal-leave-iframe .modal-footer{
|
|
border-top: none;
|
|
}
|
|
@media (min-width: 576px){
|
|
.modal-leave-iframe .modal-footer button{
|
|
padding: 7px 50px;
|
|
border-radius: 7px;
|
|
}
|
|
}
|
|
@media (max-width: 576px){
|
|
.modal-leave-iframe .modal-footer button{
|
|
padding: 7px 20px;
|
|
border-radius: 7px;
|
|
}
|
|
}
|
|
.modal-leave-iframe .modal-footer button.continue-editing:hover{
|
|
background: rgba(0,0,0,0.06);
|
|
}
|
|
.modal-leave-iframe .modal-header .close5fgdr4{
|
|
border-radius:50%;
|
|
padding:9px 12px;
|
|
background:rgba(0,0,0,0.1);
|
|
cursor: pointer;
|
|
}
|
|
.modal-leave-iframe .modal-header .close5fgdr4:hover{
|
|
background:rgba(0,0,0,0.2);
|
|
}
|
|
.modal-leave-iframe .modal-header .modal-title{
|
|
font-size: 1.25rem;
|
|
font-weight: bold;
|
|
}
|
|
.modal-leave-iframe .modal-header .close5fgdr4 i{
|
|
font-size: 23px;
|
|
}
|
|
#modal_leave_iframe .error-authentication{
|
|
display: none;
|
|
}
|
|
</style>
|
|
<!-- styling -->
|
|
|
|
<!-- leave iframe modal -->
|
|
<div class="modal modal-leave-iframe" id="modal_leave_iframe" data-bs-backdrop="static"
|
|
data-bs-keyboard="false" tabindex="-1" aria-labelledby="modal_leave_iframe_label" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header px-3 py-2">
|
|
<h5 class="modal-title" id="modal_leave_iframe_label">FTF HOME VISIT FORM</h5>
|
|
</div>
|
|
<div class="modal-body px-3 py-2">
|
|
<div class="form-floating">
|
|
<input type="password" class="form-control" name="secondary_authentication_otp" id="secondary_authentication_otp" placeholder="Enter password...">
|
|
<label for="secondary_authentication_otp">Password</label>
|
|
</div>
|
|
<span class="text-danger error-authentication">***Incorrect password</span>
|
|
</div>
|
|
<div class="modal-footer px-3 py-2">
|
|
<button type="button" class="btn continue-editing text-secondary" onclick="closeFtfForm()">
|
|
Leave
|
|
</button>
|
|
<button type="button" class="btn btn-success light" onclick="credValidation()">
|
|
Open Form
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- leave iframe modal -->
|
|
|
|
<!-- scripting -->
|
|
<script type="text/javascript">
|
|
function closeFtfForm(){
|
|
window.location.href="<?=base_url()?>";
|
|
}
|
|
function credValidation(){
|
|
var cred=$("#secondary_authentication_otp").val();
|
|
if(cred==='wecuro@123'){
|
|
$("#modal_leave_iframe").find('.error-authentication').hide();
|
|
callLeaveModal(false);
|
|
}else{
|
|
$("#modal_leave_iframe").find('.error-authentication').show();
|
|
}
|
|
}
|
|
function callLeaveModal(stat=null){
|
|
if(stat==null){
|
|
$("#modal_leave_iframe").toggle();
|
|
}else{
|
|
if(stat){
|
|
$("#modal_leave_iframe").show();
|
|
}else{
|
|
$("#modal_leave_iframe").hide();
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<!-- scripting -->
|
|
<!-- leave modal --> |