This extremely simple change would allow support for disabled em-text boxes. I was going to generate a pull request but I think it'd be easier to just add them yourself. If not, I'm happy to fork it and make the request! All that needs to be changed is addon/text.js to:
import Em from 'ember';
import FormGroupComponent from './group';
import ControlMixin from 'ember-idx-forms/mixins/control';
/*
Form Input
Syntax:
{{em-text property="property name" rows=4}}
*/
export default FormGroupComponent.extend({
controlView: Em.TextArea.extend(ControlMixin, {
attributeBindings: ['placeholder'],
placeholder: Em.computed.alias('parentView.placeholder'),
model: Em.computed.alias('parentView.model'),
propertyName: Em.computed.alias('parentView.propertyName'),
rows: Em.computed.alias('parentView.rows'), // ADDED A COMMA (duh)
disabled: Em.computed.alias('parentView.disabled') // ADDED THIS LINE
}),
property: void 0,
label: void 0,
placeholder: void 0,
rows: 4,
disabled: void 0, // ADDED THIS LINE
controlWrapper: (function() {
if (this.get('form.form_layout') === 'horizontal') {
return 'col-sm-10';
}
return null;
}).property('form.form_layout')
});
This extremely simple change would allow support for disabled
em-text
boxes. I was going to generate a pull request but I think it'd be easier to just add them yourself. If not, I'm happy to fork it and make the request! All that needs to be changed isaddon/text.js
to: