mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-23 08:43:19 +01:00
Add IsDisabled option to Form and FormButtons components
This commit is contained in:
parent
8391a1df15
commit
719c02e625
3
resources/js/components/Form.js
vendored
3
resources/js/components/Form.js
vendored
@ -11,6 +11,7 @@ class Form {
|
||||
*/
|
||||
constructor (data = {}) {
|
||||
this.isBusy = false
|
||||
this.isDisabled = false
|
||||
// this.successful = false
|
||||
this.errors = new Errors()
|
||||
// this.originalData = deepCopy(data)
|
||||
@ -268,6 +269,6 @@ class Form {
|
||||
|
||||
Form.routes = {}
|
||||
Form.errorMessage = 'Something went wrong. Please try again.'
|
||||
Form.ignore = ['isBusy', /*'successful'*/, 'errors', 'originalData']
|
||||
Form.ignore = ['isBusy', 'isDisabled', 'errors', 'originalData']
|
||||
|
||||
export default Form
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<v-button :isLoading="isBusy" >{{ caption }}</v-button>
|
||||
<v-button :isLoading="isBusy" :disabled="isDisabled" >{{ caption }}</v-button>
|
||||
</div>
|
||||
<div class="control" v-if="showCancelButton">
|
||||
<router-link :to="{ name: cancelLandingView }" class="button is-text">{{ $t('commons.cancel') }}</router-link>
|
||||
@ -30,6 +30,11 @@
|
||||
default: false
|
||||
},
|
||||
|
||||
isDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
caption: {
|
||||
type: String,
|
||||
default: 'Submit'
|
||||
|
Loading…
Reference in New Issue
Block a user