This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/preference-checkbox.js.es6
2019-10-23 12:30:52 -04:00

23 lines
405 B
JavaScript

import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Component.extend({
classNames: ["controls"],
@computed("labelKey")
label(labelKey) {
return I18n.t(labelKey);
},
change() {
const warning = this.warning;
if (warning && this.checked) {
this.warning();
return false;
}
return true;
}
});