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
18 * Create a new TextArea
19 * @param {Object} config The config object
22 Roo.bootstrap.TextArea = function(config){
23 Roo.bootstrap.TextArea.superclass.constructor.call(this, config);
27 Roo.extend(Roo.bootstrap.TextArea, Roo.bootstrap.Input, {
34 getAutoCreate : function(){
36 var parent = this.parent();
38 var align = parent.labelAlign;
51 placeholder : this.placeholder || ''
56 input.cols = this.cols;
60 input.readonly = true;
64 input.name = this.name;
68 input.cls += ' input-' + this.size;
72 ['xs','sm','md','lg'].map(function(size){
74 cfg.cls += ' col-' + size + '-' + settings[size];
78 var inputblock = input;
80 if (this.before || this.after) {
89 cls : 'input-group-addon',
93 inputblock.cn.push(input);
97 cls : 'input-group-addon',
104 if (align ==='left' && this.fieldLabel.length) {
105 Roo.log("left and has label");
111 cls : 'control-label col-sm-' + this.labelWidth,
112 html : this.fieldLabel
116 cls : "col-sm-" + (12 - this.labelWidth),
123 } else if ( this.fieldLabel.length) {
129 //cls : 'input-group-addon',
130 html : this.fieldLabel
140 Roo.log(" no label && no align");
158 * return the real textarea element.
162 return this.el.select('textarea.form-control',true).first();