14 lines
456 B
JavaScript
14 lines
456 B
JavaScript
import { computed } from '@ember/object';
|
|
import { match } from '@ember/object/computed';
|
|
import BaseFormInput from './base-form-input';
|
|
|
|
export default BaseFormInput.extend({
|
|
classNames: ['form-group'],
|
|
classNameBindings: ['hasError:has-error'],
|
|
hasError: computed('route.controller.errors', function() {
|
|
return this.get('errors.' + this.get('idField'));
|
|
}),
|
|
btnIcon: 'fa-server',
|
|
isFaBtnIcon: match('btnIcon', /^fa-/)
|
|
});
|