Add canSave to the form mixin to toggle whether or not the Next button is disabled
This commit is contained in:
parent
c8e700c8fe
commit
72d274c1f8
@ -44,6 +44,18 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
canSave: function() {
|
||||
if (!this.invalid) {
|
||||
return true
|
||||
} else if (this.changed && !this.invalid) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
changed: this.hasChanges,
|
||||
|
@ -13,7 +13,7 @@
|
||||
<input
|
||||
type="submit"
|
||||
tabindex="0"
|
||||
:disabled="!changed"
|
||||
:disabled="!canSave"
|
||||
value="{{ next_button_text }}"
|
||||
form="to_form"
|
||||
class="usa-button usa-button-primary">
|
||||
|
Loading…
x
Reference in New Issue
Block a user