mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-19 19:28:08 +02: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 = {}) {
|
constructor (data = {}) {
|
||||||
this.isBusy = false
|
this.isBusy = false
|
||||||
|
this.isDisabled = false
|
||||||
// this.successful = false
|
// this.successful = false
|
||||||
this.errors = new Errors()
|
this.errors = new Errors()
|
||||||
// this.originalData = deepCopy(data)
|
// this.originalData = deepCopy(data)
|
||||||
@ -268,6 +269,6 @@ class Form {
|
|||||||
|
|
||||||
Form.routes = {}
|
Form.routes = {}
|
||||||
Form.errorMessage = 'Something went wrong. Please try again.'
|
Form.errorMessage = 'Something went wrong. Please try again.'
|
||||||
Form.ignore = ['isBusy', /*'successful'*/, 'errors', 'originalData']
|
Form.ignore = ['isBusy', 'isDisabled', 'errors', 'originalData']
|
||||||
|
|
||||||
export default Form
|
export default Form
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="field is-grouped">
|
<div class="field is-grouped">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<v-button :isLoading="isBusy" >{{ caption }}</v-button>
|
<v-button :isLoading="isBusy" :disabled="isDisabled" >{{ caption }}</v-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control" v-if="showCancelButton">
|
<div class="control" v-if="showCancelButton">
|
||||||
<router-link :to="{ name: cancelLandingView }" class="button is-text">{{ $t('commons.cancel') }}</router-link>
|
<router-link :to="{ name: cancelLandingView }" class="button is-text">{{ $t('commons.cancel') }}</router-link>
|
||||||
@ -30,6 +30,11 @@
|
|||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isDisabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
caption: {
|
caption: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'Submit'
|
default: 'Submit'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user