decide.nolog.cz/app/components/fm-radio.js
jelhan 01f9b6e61f extract participation form from participants table and make it a bootstrap form
started replacing ember-easy-form-extensions by ember-form-master-2000
and ember-validations by ember-cp-validations

using ember-form-master-2000 in old 0.2 release cause newer releases does not work with ember 0.12
should move to ember 2.x as soon as possible
therefore ember-easy-form-extensions has to be dropped and ember-i18n been updated

part of #76
2015-11-12 15:52:14 +01:00

18 lines
530 B
JavaScript

import FmRadio from 'ember-form-master-2000/components/fm-radio';
import Ember from 'ember';
export default FmRadio.reopen({
change() {
this.set('parentView.value', this.get('value'));
// backport feature: do not show errors before user interaction
this.sendAction('onUserInteraction');
},
icon: Ember.computed('parentView.optionIconPath', function() {
if(this.get('parentView.optionIconPath')) {
return this.get(this.get('parentView.optionIconPath'));
} else {
return null;
}
})
});