Put checkbox before label by default

This commit is contained in:
Nathan Gray 2013-09-10 18:39:31 +00:00
parent 3ae18c9a78
commit dcfcec3ab1

View File

@ -80,6 +80,16 @@ var et2_checkbox = et2_inputWidget.extend(
this.setDOMNode(this.input[0]);
},
/**
* Override default to place checkbox before label, if there is no %s in the label
*/
set_label: function(label) {
if(label.length && label.indexOf('%s') < 0)
{
label = '%s'+label;
}
this._super.apply(this, [label]);
},
/**
* Override default to match against set/unset value
*/