function togglePassword(fieldId,btn){
    const f=document.getElementById(fieldId);
    if(f.type==='password'){f.type='text';btn.innerHTML='<i class="fas fa-eye-slash"></i>';}
    else{f.type='password';btn.innerHTML='<i class="fas fa-eye"></i>';}
}
document.addEventListener('DOMContentLoaded',function(){
    var t=[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
    t.map(function(el){return new bootstrap.Tooltip(el);});
});
function confirmAction(msg,url){if(confirm(msg))window.location.href=url;}