Implementing Activate User

This commit is contained in:
Chris Mann 2023-07-21 07:52:22 +02:00
parent 94be915475
commit 3418755b4d
2 changed files with 11 additions and 9 deletions

View file

@ -16,12 +16,4 @@ if (idvalueInput != null) {
}
function changeUsername () {
username = document.getElementById("username");
calcCn = document.getElementById("calc-cn");
username.value = username.value.toLowerCase().replace(/[^A-z0-9.-]/g, '');
calcCn.innerText = "Login Name et Courriel seront : " + username.value.split("@")[0] + "@lesgv.com";
}
if (document.getElementById("username") != null) {
document.getElementById("username").addEventListener("change",changeUsername);
}

View file

@ -87,5 +87,15 @@
{{end}}
<button type="submit" class="btn btn-primary">Créer le compte</button>
</form>
<script lang="javascript">
function changeUsername () {
username = document.getElementById("username");
calcCn = document.getElementById("calc-cn");
username.value = username.value.toLowerCase().replace(/[^A-z0-9.-]/g, '');
calcCn.innerText = "Login Name et Courriel seront : " + username.value.split("@")[0] + "@lesgv.com";
}
document.getElementById("username").addEventListener("change",changeUsername);
</script>
{{end}}
{{end}}