diff --git a/src/main/webapp/JS/login.js b/src/main/webapp/JS/login.js index 6004060..c2ebb6a 100644 --- a/src/main/webapp/JS/login.js +++ b/src/main/webapp/JS/login.js @@ -90,19 +90,6 @@ $(document).ready(function startUp() { }); }); - - $("#showPassword").click(function (event){ - togglePassword(event); - - }); - $("#hidePassword").click(function (event){ - event.preventDefault(); - togglePassword(event); - }); - - $("#email").blur(function (){ - checkRegexEmail(); - }); }); function togglePassword(event) { @@ -192,37 +179,3 @@ function showError(message) { newPasswordError.removeClass('error active'); } } -function togglePassword(event){ - event.preventDefault(); - - const passwordField = $("#password"); - let passwordType = passwordField.attr('type'); - console.log(passwordType); - - if (passwordType === 'password') { - passwordField.attr("type", "text") - } else { - passwordField.attr("type", "password"); - } - - $("#showPassword").toggle() - $("#hidePassword").toggle() - - return NaN -} - -function checkRegexEmail() { - const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/; - const emailField = $("#email"); - - if (regex.test(emailField.val())) { - $("#validEmail").show() - $("#invalidEmail").hide() - - } else { - $("#validEmail").hide() - $("#invalidEmail").show() - } - - return NaN -} \ No newline at end of file diff --git a/src/main/webapp/JSP/login.jsp b/src/main/webapp/JSP/login.jsp index 25398f8..52de647 100644 --- a/src/main/webapp/JSP/login.jsp +++ b/src/main/webapp/JSP/login.jsp @@ -73,7 +73,7 @@ - +