diff --git a/app/assets/javascripts/discourse/components/d-checkbox.js.es6 b/app/assets/javascripts/discourse/components/d-checkbox.js.es6
index 5e50bf98eda..91f6d6f0a68 100644
--- a/app/assets/javascripts/discourse/components/d-checkbox.js.es6
+++ b/app/assets/javascripts/discourse/components/d-checkbox.js.es6
@@ -3,9 +3,8 @@ import { on } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
tagName: 'label',
- didInsertElement() {
- this._super();
-
+ @on("didInsertElement")
+ _init() {
const checked = this.get('checked');
if (checked && checked !== "false") {
this.$('input').prop('checked', true);
@@ -18,8 +17,7 @@ export default Ember.Component.extend({
},
@on('willDestroyElement')
- willDestroyElement() {
- this._super();
+ _clear() {
this.$('input').off('click.d-checkbox');
}
});
diff --git a/app/assets/javascripts/discourse/templates/components/d-checkbox.hbs b/app/assets/javascripts/discourse/templates/components/d-checkbox.hbs
index f39a68e79c9..8ec5979a1fd 100644
--- a/app/assets/javascripts/discourse/templates/components/d-checkbox.hbs
+++ b/app/assets/javascripts/discourse/templates/components/d-checkbox.hbs
@@ -1,2 +1,2 @@
-
+
{{i18n label}}