This commit is contained in:
2020-03-05 23:01:18 +00:00
parent 688360d20a
commit bcfe2bbaa2
3 changed files with 40 additions and 0 deletions

View File

@@ -267,6 +267,38 @@ export default {
}
},
///////////////////////////////
// Confirm password
// (two fields must match)
//
confirmMatch(vm, refFirst, refSecond) {
if (vm.formState.loading) {
return false;
}
var ctrlFirst = getControl(vm, refFirst);
if (typeof ctrlFirst == "undefined") {
return false;
}
var ctrlSecond = getControl(vm, refSecond);
if (typeof ctrlSecond == "undefined") {
return false;
}
var valueFirst = getControlValue(ctrlFirst);
var valueSecond = getControlValue(ctrlSecond);
if (valueFirst != valueSecond) {
var err = window.$gz.locale.get("ErrorNoMatch");
//Update the form status
this.setFormState({
vm: vm,
valid: false
});
return err;
} else {
return false;
}
},
///////////////////////////////
// INTEGER IS VALID
//
integerValid(vm, ref) {

View File

@@ -145,6 +145,7 @@ export default {
"ErrorServerUnresponsive",
"ErrorUserNotAuthenticated",
"ErrorUserNotAuthorized",
"ErrorNoMatch",
"DeletePrompt",
"AreYouSureUnsavedChanges",
"Leave",