atst/js/components/forms/edit_officer_form.js
2019-03-13 11:40:01 -04:00

47 lines
800 B
JavaScript

import FormMixin from '../../mixins/form'
import checkboxinput from '../checkbox_input'
import textinput from '../text_input'
import ConfirmationPopover from '../confirmation_popover'
export default {
name: 'edit-officer-form',
mixins: [FormMixin],
components: {
checkboxinput,
textinput,
ConfirmationPopover,
},
props: {
hasChanges: {
type: Boolean,
default: () => false,
},
hasErrors: {
type: Boolean,
default: () => false,
},
},
data: function() {
return {
editing: this.hasErrors || this.hasChanges,
}
},
methods: {
edit: function(event) {
event.preventDefault()
this.editing = true
},
cancel: function(event) {
this.editing = false
},
},
template: '<div></div>',
}