Bug Fixing
This commit is contained in:
parent
47fdaa0f84
commit
2ae902aba2
1 changed files with 5 additions and 7 deletions
|
@ -111,31 +111,29 @@ function changeGivenNameOrSurname () {
|
||||||
givenname = document.getElementById("givenname");
|
givenname = document.getElementById("givenname");
|
||||||
surname = document.getElementById("surname");
|
surname = document.getElementById("surname");
|
||||||
displayname = document.getElementById("displayname");
|
displayname = document.getElementById("displayname");
|
||||||
username = document.getElementById("username");
|
|
||||||
displayname.value = givenname.value + " " + surname.value
|
displayname.value = givenname.value + " " + surname.value
|
||||||
changeDisplayname();
|
changeDisplayname();
|
||||||
}
|
}
|
||||||
function changeDisplayname () {
|
function changeDisplayname () {
|
||||||
givenname = document.getElementById("givenname");
|
|
||||||
surname = document.getElementById("surname");
|
|
||||||
displayname = document.getElementById("displayname");
|
displayname = document.getElementById("displayname");
|
||||||
username = document.getElementById("username");
|
username = document.getElementById("username");
|
||||||
username.value = displayname.value.toLowerCase().replace(/[^A-z0-9.-]/g, '').replace(/^[.-]/, '').replace(/[.-]$/, '');
|
username.value = displayname.value.toLowerCase().replace(/[^A-z0-9.-]/g, '').replace(/^[.-]/, '').replace(/[.-]$/, '');
|
||||||
changeUsername();
|
changeUsername();
|
||||||
}
|
}
|
||||||
function changeUsername () {
|
function changeUsername () {
|
||||||
givenname = document.getElementById("givenname");
|
changeDomain();
|
||||||
surname = document.getElementById("surname");
|
}
|
||||||
displayname = document.getElementById("displayname");
|
function changeDomain () {
|
||||||
username = document.getElementById("username");
|
username = document.getElementById("username");
|
||||||
mail = document.getElementById("mail");
|
|
||||||
defaultdomain = document.getElementById("defaultdomain");
|
defaultdomain = document.getElementById("defaultdomain");
|
||||||
|
mail = document.getElementById("mail");
|
||||||
mail.value = username.value + "@" + defaultdomain.value;
|
mail.value = username.value + "@" + defaultdomain.value;
|
||||||
}
|
}
|
||||||
document.getElementById("givenname").addEventListener("change",changeGivenNameOrSurname);
|
document.getElementById("givenname").addEventListener("change",changeGivenNameOrSurname);
|
||||||
document.getElementById("surname").addEventListener("change",changeGivenNameOrSurname);
|
document.getElementById("surname").addEventListener("change",changeGivenNameOrSurname);
|
||||||
document.getElementById("displayname").addEventListener("change",changeDisplayname);
|
document.getElementById("displayname").addEventListener("change",changeDisplayname);
|
||||||
document.getElementById("username").addEventListener("change",changeUsername);
|
document.getElementById("username").addEventListener("change",changeUsername);
|
||||||
|
document.getElementById("defaultdomain").addEventListener("change",changeDomain);
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
Loading…
Reference in a new issue