This commit is contained in:
2021-03-12 00:09:57 +00:00
parent b8d44cc59f
commit 3c726defa6

View File

@@ -26,10 +26,17 @@
:label="$ay.t('AuthEnterPin')" :label="$ay.t('AuthEnterPin')"
:error-messages="form().serverErrors(this, 'pin')" :error-messages="form().serverErrors(this, 'pin')"
ref="pin" ref="pin"
@input="fieldValueChanged('mapUrlTemplate')" @input="fieldValueChanged('pin')"
data-cy="tfaPin" data-cy="tfaPin"
></v-text-field> ></v-text-field>
</v-card-text> </v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="primary" text @click="authenticate()">{{
$ay.t("OK")
}}</v-btn>
</v-card-actions>
</v-card> </v-card>
</v-col> </v-col>
</template> </template>
@@ -157,7 +164,8 @@ export default {
window.$gz.form.fieldValueChanged(this, ref); window.$gz.form.fieldValueChanged(this, ref);
} }
}, },
async submit() {
async authenticate() {
let vm = this; let vm = this;
if (vm.canSave) { if (vm.canSave) {
vm.formState.loading = true; vm.formState.loading = true;
@@ -168,7 +176,7 @@ export default {
//clear any errors vm might be around from previous submit //clear any errors vm might be around from previous submit
window.$gz.form.deleteAllErrorBoxErrors(vm); window.$gz.form.deleteAllErrorBoxErrors(vm);
try { try {
let res = await window.$gz.api.upsert(url, vm.obj); let res = await window.$gz.api.upsert(url, vm.pin);
if (res.error) { if (res.error) {
vm.formState.serverError = res.error; vm.formState.serverError = res.error;