mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 15:44:41 +08:00
19 lines
339 B
JavaScript
19 lines
339 B
JavaScript
export default Em.Component.extend({
|
|
classNames: ['controls'],
|
|
|
|
label: function() {
|
|
return I18n.t(this.get('labelKey'));
|
|
}.property('labelKey'),
|
|
|
|
change() {
|
|
const warning = this.get('warning');
|
|
|
|
if (warning && this.get('checked')) {
|
|
this.sendAction('warning');
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
});
|