function js_login(){ $('#action').val('31'); $('#stage').val('2'); $("#gf_login").submit(); } function js_forget(){ $('#action').val('34'); $('#stage').val('1'); $("#gf_login").submit(); } function js_reg(){ window.location.replace("/book/cgi-bin/app_reg.cgi"); } function js_event(){ window.location.replace("/book/cgi-bin/app_crs.cgi"); } function js_contact(){ // window.location.replace("/book/cgi-bin/app_contact.cgi"); window.open("https://ntucclub.my.salesforce-sites.com/mygolfkaki", "_blank"); } $(function() { const togglePassword = document.querySelector("#togglePassword"); const password = document.querySelector("#password"); togglePassword.addEventListener("click", function () { // toggle the type attribute const type = password.getAttribute("type") === "password" ? "text" : "password"; password.setAttribute("type", type); // toggle the eye icon this.classList.toggle('fa-eye'); this.classList.toggle('fa-eye-slash'); }); }); function js_bio(){ window.WTN.Biometric.checkStatus({ callback:function(statusData){ { if (statusData.isSuccess) { if (statusData.hasTouchId) { if (statusData.hasSecret) { window.WTN.Biometric.show({ prompt:"Please authenticate to continue", callback:function(authData){ { if (authData.isSuccess) { $('#bio_key').val(authData.secret); // memberid is optional — server identifies the member by token. // Pass it along if the user typed it to speed up the DB lookup. $('#memberid').val($('#userid').val()); $('#bio_nonce').val('d171f0e07f3de53c486f0f174c815b3231215f2bbaded5e2ad22996e80b71334'); $('#action').val('11'); $('#stage').val('2'); $("#gf_login").submit(); } } } }); } else { alert('Biometric is not set up. Please log in with your password and enable biometrics in your profile settings.') } } else { alert('Biometric is not supported on this device.') } } } } }); }