Merge pull request #1403 from dod-ccpo/app-settings-fixes
App settings fixes
This commit is contained in:
commit
84e3e0603f
@ -5,6 +5,13 @@ export default {
|
|||||||
|
|
||||||
mixins: [ToggleMixin],
|
mixins: [ToggleMixin],
|
||||||
|
|
||||||
|
props: {
|
||||||
|
defaultVisible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toggle: function(e) {
|
toggle: function(e) {
|
||||||
if (this.$el.contains(e.target)) {
|
if (this.$el.contains(e.target)) {
|
||||||
|
@ -15,6 +15,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
changed: this.hasChanges,
|
changed: this.hasChanges,
|
||||||
valid: false,
|
valid: false,
|
||||||
|
submitted: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -36,15 +37,16 @@ export default {
|
|||||||
handleSubmit: function(event) {
|
handleSubmit: function(event) {
|
||||||
if (!this.valid) {
|
if (!this.valid) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
this.submitted = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
if (this.changed && this.valid) {
|
if (this.changed && this.valid && !this.submitted) {
|
||||||
return true
|
return true
|
||||||
} else if (this.enableSave && this.valid) {
|
} else if (this.enableSave && this.valid && !this.submitted) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user