initFormsTab function exported
Last updated: 2026-03-04T23:21:38.431Z
Location
Metrics
LOC: 28
Complexity: 2
Params: 0
Signature
initFormsTab(): : void
Source Code
export function initFormsTab(): void {
void loadSavedForms();
document
.getElementById("btn-create-template")
?.addEventListener("click", () => {
openCreatePanel();
});
document.getElementById("btn-export-forms")?.addEventListener("click", () => {
void exportForms();
});
const fileInput = document.getElementById(
"import-forms-file",
) as HTMLInputElement | null;
document.getElementById("btn-import-forms")?.addEventListener("click", () => {
fileInput?.click();
});
fileInput?.addEventListener("change", () => {
const file = fileInput.files?.[0];
if (!file) return;
void importForms(file);
fileInput.value = "";
});
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| loadSavedForms | calls |
| openCreatePanel | calls |
| exportForms | calls |
| importForms | calls |
| click | dynamic_call |
| change | dynamic_call |
Impact (Incoming)
| Source | Type |
|---|---|
| main | calls |