/**
* 必须项目添加星号
*/
Ext.override(Ext.layout.FormLayout, {
getTemplateArgs : function(field) {
var noLabelSep = !field.fieldLabel || field.hideLabel;
var label = field.fieldLabel;
var labelMark = field.labelMark;
if (typeof labelMark != 'undefined') {
label = labelMark + label;
} else if (field.fieldLabel && !field.allowBlank) {
label = '<span style="color: #CC3300; padding-right: 2px;">*</span>' + label;
}
return {
id : field.id,
label : label,
labelStyle : field.labelStyle || this.labelStyle || '',
elementStyle : this.elementStyle || '',
labelSeparator : noLabelSep ? '' : field.labelSeparator || this.labelSeparator || '',
itemCls : (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : ''),
clearCls : field.clearCls || 'x-form-clear-left'
};
}
});
labelMark可以单独设置