9 * @class Roo.bootstrap.TextArea
10 * @extends Roo.bootstrap.Component
11 * Bootstrap TextArea class
12 * @cfg {Number} cols Specifies the visible width of a text area
13 * @cfg {Number} rows Specifies the visible number of lines in a text area
14 * @cfg {Number} readOnly Specifies that a text area should be read-only
15 * @cfg {string} wrap (soft|hard)Specifies how the text in a text area is to be wrapped when submitted in a form
16 * @cfg {string} resize Specifies resizeable of a text area
19 * Create a new TextArea
20 * @param {Object} config The config object
23 Roo.bootstrap.TextArea = function(config){
24 Roo.bootstrap.TextArea.superclass.constructor.call(this, config);
28 Roo.extend(Roo.bootstrap.TextArea, Roo.bootstrap.Input, {
36 getAutoCreate : function(){
38 var parent = this.parent();
40 var align = parent.labelAlign;
54 placeholder : this.placeholder || ''
59 input.name = this.name;
63 input.cls += ' input-' + this.size;
67 ['xs','sm','md','lg'].map(function(size){
69 cfg.cls += ' col-' + size + '-' + settings[size];
73 var inputblock = input;
75 if (this.before || this.after) {
84 cls : 'input-group-addon',
88 inputblock.cn.push(input);
92 cls : 'input-group-addon',
99 if (align ==='left' && this.fieldLabel.length) {
100 Roo.log("left and has label");
106 cls : 'control-label col-sm-' + this.labelWidth,
107 html : this.fieldLabel
111 cls : "col-sm-" + (12 - this.labelWidth),
118 } else if ( this.fieldLabel.length) {
124 //cls : 'input-group-addon',
125 html : this.fieldLabel
135 Roo.log(" no label && no align");
150 input.readonly = true;
157 * return the real textarea element.
161 return this.el.select('textarea.form-control',true).first();