It will be enabled when the user checks the "manage environments" permission. This updates the Jinja and Vue checkbox input components so that Vue can monitor the inpur state.
30 lines
442 B
JavaScript
30 lines
442 B
JavaScript
import { emitEvent } from '../lib/emitters'
|
|
|
|
export default {
|
|
name: 'checkboxinput',
|
|
|
|
components: {
|
|
checkboxinput: this,
|
|
},
|
|
|
|
props: {
|
|
name: String,
|
|
initialChecked: Boolean,
|
|
},
|
|
|
|
data: function() {
|
|
return {
|
|
checked: this.initialChecked,
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
onInput: function(e) {
|
|
emitEvent('field-change', this, {
|
|
value: e.target.checked,
|
|
name: this.name,
|
|
})
|
|
},
|
|
},
|
|
}
|