The environment name will be grayed out until something besides the default "no access" is selected. Small changes to the application member subforms: - filter for "None" as a string - have nested forms inherit from FlaskForm; each nested form adds its own validation error flash otherwise if there are validation problems
36 lines
728 B
JavaScript
36 lines
728 B
JavaScript
import { emitEvent } from '../lib/emitters'
|
|
|
|
export default {
|
|
name: 'optionsinput',
|
|
|
|
props: {
|
|
name: String,
|
|
initialErrors: {
|
|
type: Array,
|
|
default: () => [],
|
|
},
|
|
initialValue: String,
|
|
},
|
|
|
|
data: function() {
|
|
const showError = (this.initialErrors && this.initialErrors.length) || false
|
|
return {
|
|
showError: showError,
|
|
showValid: !showError && !!this.initialValue,
|
|
validationError: this.initialErrors.join(' '),
|
|
value: this.initialValue,
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
onInput: function(e) {
|
|
emitEvent('field-change', this, {
|
|
value: e.target.value,
|
|
name: this.name,
|
|
})
|
|
this.showError = false
|
|
this.showValid = true
|
|
},
|
|
},
|
|
}
|