add description option to FormItem

This commit is contained in:
rolux 2011-11-30 15:44:35 +01:00
parent 8c34d09861
commit ec4a1c0605

View file

@ -22,9 +22,16 @@ Ox.FormItem = function(options, self) {
error: '',
})
.options(options || {})
.addClass('OxFormItem')
.append(self.options.element);
.addClass('OxFormItem');
self.description = self.options.element.options('description');
if (self.description) {
$('<div>')
.addClass('OxFormDescription')
.html(self.description)
.appendTo(that);
}
that.append(self.options.element);
self.$message = Ox.Element()
.addClass('OxFormMessage')
.appendTo(that);