diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index d13496c95..d514715b6 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -35,6 +35,7 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) { this.execute(); // Create our elements this.labelDomNode = this.document.createElement("label"); + this.labelDomNode.setAttribute("class",this.checkboxClass); this.inputDomNode = this.document.createElement("input"); this.inputDomNode.setAttribute("type","checkbox"); if(this.getValue()) { @@ -126,6 +127,7 @@ CheckboxWidget.prototype.execute = function() { this.checkboxChecked = this.getAttribute("checked"); this.checkboxUnchecked = this.getAttribute("unchecked"); this.checkboxDefault = this.getAttribute("default"); + this.checkboxClass = this.getAttribute("class",""); // Make the child widgets this.makeChildWidgets(); }; diff --git a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid index 21b13e236..d521ea3e5 100644 --- a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid @@ -1,6 +1,6 @@ title: CheckboxWidget created: 201310241419 -modified: 201407110837 +modified: 201502050050 tags: Widgets caption: checkbox @@ -22,6 +22,7 @@ The content of the `<$checkbox>` widget is displayed within an HTML `