Skip to content

Commit

Permalink
noiV2 theme: move trim script to template.ftl
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Jul 23, 2024
1 parent 8727c30 commit e88b7a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
12 changes: 0 additions & 12 deletions themes/noiV2/login/resources/js/script.js

This file was deleted.

9 changes: 8 additions & 1 deletion themes/noiV2/login/template.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,15 @@
x.className = "mobile-languages";
}
}
document.addEventListener("DOMContentLoaded", function(event) {
let username = document.getElementById("username");
username.addEventListener("change", (event) => {
username.value = username.value.replaceAll(" ", "")
});
});
</script>
</body>

</html>
</#macro>
</#macro>
3 changes: 0 additions & 3 deletions themes/noiV2/login/theme.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ 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
kcLoginClass=flex flex-col flex-auto
Expand Down

0 comments on commit e88b7a1

Please sign in to comment.