mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-29 22:25:59 +00:00
feat(ui): clear panel form inputs when closed
This commit replaces the SSH key-specific code in favor of resetting panel forms when closed, which thus carries the same behavior over to the GPG key field.
This commit is contained in:
parent
654c02a8dd
commit
4dcec32505
5 changed files with 29 additions and 12 deletions
|
@ -51,6 +51,14 @@ export function isElemHidden(el) {
|
|||
return res[0];
|
||||
}
|
||||
|
||||
export function resetForms(el) {
|
||||
queryElemChildren(el, 'form', resetForm);
|
||||
}
|
||||
|
||||
function resetForm(form) {
|
||||
form.reset();
|
||||
}
|
||||
|
||||
function applyElemsCallback(elems, fn) {
|
||||
if (fn) {
|
||||
for (const el of elems) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue