Put radio button labels after radio button by default

This commit is contained in:
Nathan Gray 2013-06-18 15:08:50 +00:00
parent db75f272b8
commit b933b17446

View File

@ -80,6 +80,19 @@ var et2_radiobox = et2_inputWidget.extend(
this.input.attr("name", _name);
},
/**
* Default for radio buttons is label after button
*
* @param _label String New label for radio button. Use %s to locate the radio button somewhere else in the label
*/
set_label: function(_label) {
if(_label.length > 0 && _label.indexOf('%s')==-1)
{
_label = '%s'+_label;
}
this._super.apply(this, [_label]);
},
/**
* Override default to match against set/unset value
*/