Use same pattern for form validation

This commit is contained in:
Girish Ramakrishnan
2025-12-05 18:06:03 +01:00
parent 35d0227862
commit dfafbdd882
15 changed files with 189 additions and 154 deletions
+3 -1
View File
@@ -10,7 +10,6 @@ import { REGIONS_CONTABO, REGIONS_VULTR, REGIONS_IONOS, REGIONS_OVH, REGIONS_LIN
const appsModel = AppsModel.create();
const dialog = useTemplateRef('dialog');
const form = useTemplateRef('form');
const backupConfigInput = useTemplateRef('backupConfigInput');
const appId = ref('');
const busy = ref(false);
@@ -24,6 +23,7 @@ const encryptionPasswordHint = ref('');
const encryptionPassword = ref('');
const encryptedFilenames = ref(false);
const form = useTemplateRef('form');
const isFormValid = ref(false);
function checkValidity() {
isFormValid.value = form.value ? form.value.checkValidity() : false;
@@ -279,6 +279,8 @@ defineExpose({
encryptionPasswordHint.value = '';
dialog.value.open();
setTimeout(checkValidity, 100); // update state of the confirm button
}
});