set default login realm in login page
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
fa66459da7
commit
42e8d729d6
@ -10,6 +10,9 @@ async function init (){
|
|||||||
let realmSelect = document.querySelector("#realm");
|
let realmSelect = document.querySelector("#realm");
|
||||||
realms.data.forEach((element) => {
|
realms.data.forEach((element) => {
|
||||||
realmSelect.add(new Option(element.comment, element.realm));
|
realmSelect.add(new Option(element.comment, element.realm));
|
||||||
|
if("default" in element && element.default === 1){
|
||||||
|
realmSelect.value = element.realm;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
formSubmitButton.addEventListener("click", async (e) => {
|
formSubmitButton.addEventListener("click", async (e) => {
|
||||||
status.innerText = "";
|
status.innerText = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user