For radiobox customfields, implement "empty" first value = extra group label

This commit is contained in:
Nathan Gray
2013-06-18 20:55:13 +00:00
parent 014a273908
commit 8a2c791be3
2 changed files with 71 additions and 5 deletions

View File

@ -411,9 +411,15 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
return true;
},
_setup_radio: function(field_name, field, attrs) {
// No label on the widget itself
// 'Empty' label will be first
delete(attrs.label);
if(field.values && field.values[''])
{
attrs.label = field.values[''];
delete field.values[''];
}
field.type = 'radiogroup';
attrs.options = field.values;
return true;