4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
12 * This class is a container created by the form element with
13 * a label and control item.
15 * @class tinymce.ui.FormItem
16 * @extends tinymce.ui.Container
17 * @setting {String} label Label to display for the form item.
19 define("tinymce/ui/FormItem", [
20 "tinymce/ui/Container"
21 ], function(Container) {
24 return Container.extend({
34 * Renders the control as a HTML string.
37 * @return {String} HTML representing the control.
39 renderHtml: function() {
40 var self = this, layout = self._layout, prefix = self.classPrefix;
42 self.addClass('formitem');
43 layout.preRender(self);
46 '<div id="' + self._id + '" class="' + self.classes() + '" hideFocus="1" tabIndex="-1">' +
47 (self.settings.title ? ('<div id="' + self._id + '-title" class="' + prefix + 'title">' +
48 self.settings.title + '</div>') : '') +
49 '<div id="' + self._id + '-body" class="' + self.classes('body') + '">' +
50 (self.settings.html || '') + layout.renderHtml(self) +