Front-End Stuff
This commit is contained in:
parent
d7633797c2
commit
0caf79a96a
2 changed files with 16 additions and 1 deletions
|
@ -142,9 +142,11 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi
|
||||||
} else {
|
} else {
|
||||||
newUser.Password = password2
|
newUser.Password = password2
|
||||||
data.Success = addNewUser(newUser, config, login)
|
data.Success = addNewUser(newUser, config, login)
|
||||||
|
http.Redirect(w, r, "/admin/ldap/"+newUser.DN, http.StatusFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
// tryCreateAccount(l, data, password1, password2, invitedBy)
|
// tryCreateAccount(l, data, password1, password2, invitedBy)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
templateInviteNewAccount.Execute(w, data)
|
templateInviteNewAccount.Execute(w, data)
|
||||||
|
|
|
@ -10,4 +10,17 @@ function addResDigitaOrgIdValue () {
|
||||||
function addResDigitaOrgMail () {
|
function addResDigitaOrgMail () {
|
||||||
document.getElementById("idvalue").value = addResDigitaOrg("mail");
|
document.getElementById("idvalue").value = addResDigitaOrg("mail");
|
||||||
}
|
}
|
||||||
document.getElementById("idvalue").addEventListener("change",addResDigitaOrgIdValue);
|
let idvalueInput = document.querySelector("#idvalue");
|
||||||
|
if (idvalueInput != null) {
|
||||||
|
idvalueInput.addEventListener("change",addResDigitaOrgIdValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function changeUsername () {
|
||||||
|
username = document.getElementById("username");
|
||||||
|
calcCn = document.getElementById("calc-cn");
|
||||||
|
calcCn.innerText = "Login Name et Courriel seront : " + username.value.split("@")[0] + "@lesgv.com";
|
||||||
|
}
|
||||||
|
if (document.getElementById("username") != null) {
|
||||||
|
document.getElementById("username").addEventListener("change",changeUsername);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue