mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 11:47:53 +02:00
Fix validation errors being displayed besides alert notification
This commit is contained in:
parent
9c818c69c5
commit
0ebb352df0
@ -25,6 +25,7 @@
|
|||||||
* to the Create or Import form with decoded URI to prefill the form
|
* to the Create or Import form with decoded URI to prefill the form
|
||||||
*/
|
*/
|
||||||
function submitQrCode() {
|
function submitQrCode() {
|
||||||
|
form.clear()
|
||||||
form.qrcode = qrcodeInput.value.files[0]
|
form.qrcode = qrcodeInput.value.files[0]
|
||||||
|
|
||||||
form.upload('/api/v1/qrcode/decode', { returnError: true }).then(response => {
|
form.upload('/api/v1/qrcode/decode', { returnError: true }).then(response => {
|
||||||
@ -38,7 +39,9 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
notify.alert({ text: trans(error.response.data.message) })
|
if (error.response.status !== 422) {
|
||||||
|
notify.alert({ text: error.response.data.message })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +80,8 @@
|
|||||||
<button v-else class="button is-link is-medium is-rounded is-main" @click="capture()">
|
<button v-else class="button is-link is-medium is-rounded is-main" @click="capture()">
|
||||||
{{ $t('twofaccounts.forms.scan_qrcode') }}
|
{{ $t('twofaccounts.forms.scan_qrcode') }}
|
||||||
</button>
|
</button>
|
||||||
<FieldError v-if="form.errors.hasAny('qrcode')" :error="form.errors.get('qrcode')" :field="'qrcode'" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<FieldError v-if="form.errors.hasAny('qrcode')" :error="form.errors.get('qrcode')" :field="'qrcode'" />
|
||||||
</div>
|
</div>
|
||||||
<!-- alternative methods -->
|
<!-- alternative methods -->
|
||||||
<div class="column is-full">
|
<div class="column is-full">
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
</RouterLink>
|
</RouterLink>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<FieldError v-if="form.errors.get('token') != undefined" :error="form.errors.get('token')" :field="form.token" />
|
|
||||||
<FormButtons
|
<FormButtons
|
||||||
:submitId="'btnRecover'"
|
:submitId="'btnRecover'"
|
||||||
:isBusy="form.isBusy"
|
:isBusy="form.isBusy"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user