feat: implement password authentication
This commit is contained in:
parent
498ecdf68b
commit
62a329aebd
5 changed files with 55 additions and 5 deletions
|
@ -7,11 +7,20 @@ function checkPwd() {
|
|||
to_show.forEach(el => {
|
||||
el.classList.add("shown");
|
||||
});
|
||||
|
||||
const to_hide = document.querySelectorAll(".no_pwd");
|
||||
to_hide.forEach(el => {
|
||||
el.classList.add("hidden");
|
||||
});
|
||||
|
||||
const buttons = document.querySelectorAll(".action button");
|
||||
buttons.forEach(btn => {
|
||||
const oldUrl= btn.getAttribute("hx-post");
|
||||
btn.setAttribute("hx-post", `${oldUrl}&pwd=${pwd}`);
|
||||
});
|
||||
|
||||
const pwd_el = document.getElementById("password");
|
||||
pwd_el.innerHTML = pwd;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue