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')"
:error-messages="form().serverErrors(this, 'pin')"
ref="pin"
@input="fieldValueChanged('mapUrlTemplate')"
@input="fieldValueChanged('pin')"
data-cy="tfaPin"
></v-text-field>
</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-col>
</template>
@@ -157,7 +164,8 @@ export default {
window.$gz.form.fieldValueChanged(this, ref);
}
},
async submit() {
async authenticate() {
let vm = this;
if (vm.canSave) {
vm.formState.loading = true;
@@ -168,7 +176,7 @@ export default {
//clear any errors vm might be around from previous submit
window.$gz.form.deleteAllErrorBoxErrors(vm);
try {
let res = await window.$gz.api.upsert(url, vm.obj);
let res = await window.$gz.api.upsert(url, vm.pin);
if (res.error) {
vm.formState.serverError = res.error;