Skip to content

Commit

Permalink
noiV2 theme: add also email trim for registration
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Jul 23, 2024
1 parent 724f4db commit f24060a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions themes/noiV2/login/template.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,20 @@
}
document.addEventListener("DOMContentLoaded", function(event) {
// login username trim
let username = document.getElementById("username");
username.addEventListener("change", (event) => {
username.value = username.value.replaceAll(" ", "")
});
if(username) {
username.addEventListener("change", (event) => {
username.value = username.value.replaceAll(" ", "")
});
}
// register email trim
let email = document.getElementById("email");
if(email) {
email.addEventListener("change", (event) => {
email.value = email.value.replaceAll(" ", "")
});
}
});
</script>
</body>
Expand Down

0 comments on commit f24060a

Please sign in to comment.