9 * @class Roo.bootstrap.TextArea
10 * @extends Roo.bootstrap.Input
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;
50 style : "resize:none",
52 placeholder : this.placeholder || ''
57 input.cols = this.cols;
61 input.readonly = true;
65 input.name = this.name;
69 input.cls += ' input-' + this.size;
73 ['xs','sm','md','lg'].map(function(size){
75 cfg.cls += ' col-' + size + '-' + settings[size];
79 var inputblock = input;
81 if (this.before || this.after) {
90 cls : 'input-group-addon',
94 inputblock.cn.push(input);
98 cls : 'input-group-addon',
105 if (align ==='left' && this.fieldLabel.length) {
106 Roo.log("left and has label");
112 cls : 'control-label col-sm-' + this.labelWidth,
113 html : this.fieldLabel
117 cls : "col-sm-" + (12 - this.labelWidth),
124 } else if ( this.fieldLabel.length) {
130 //cls : 'input-group-addon',
131 html : this.fieldLabel
141 Roo.log(" no label && no align");
159 * return the real textarea element.
163 return this.el.select('textarea.form-control',true).first();