Skip to content

Commit

Permalink
noiV2 theme: add username/email trim
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Jul 23, 2024
1 parent e9c6509 commit 9510334
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions themes/noiV2/login/resources/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// trim spaces from username/email field
document.addEventListener("DOMContentLoaded", function(event) {
let username = document.getElementById("username");
username.addEventListener("change", (event) => {
username.value = username.value.replaceAll(" ", "")
});

});
2 changes: 2 additions & 0 deletions themes/noiV2/login/theme.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ parent=base
locales=de,en,it
import=common/noiV2

scripts=js/script.js


kcBodyClass=min-h-screen flex flex-col justify-between
kcHeaderContainerClass=mb-0 lg:mb-4 xl:mb-0 flex content-end items-stretch border-b border-gray-500 px-4 lg:px-8
Expand Down

0 comments on commit 9510334

Please sign in to comment.