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, {
35 getAutoCreate : function(){
37 var parent = this.parent();
39 var align = parent.labelAlign;
53 placeholder : this.placeholder || ''
58 input.name = this.name;
62 input.cls += ' input-' + this.size;
66 ['xs','sm','md','lg'].map(function(size){
68 cfg.cls += ' col-' + size + '-' + settings[size];
72 var inputblock = input;
74 if (this.before || this.after) {
83 cls : 'input-group-addon',
87 inputblock.cn.push(input);
91 cls : 'input-group-addon',
98 if (align ==='left' && this.fieldLabel.length) {
99 Roo.log("left and has label");
105 cls : 'control-label col-sm-' + this.labelWidth,
106 html : this.fieldLabel
110 cls : "col-sm-" + (12 - this.labelWidth),
117 } else if ( this.fieldLabel.length) {
123 //cls : 'input-group-addon',
124 html : this.fieldLabel
134 Roo.log(" no label && no align");
149 input.readonly = true;
156 * return the real textarea element.
160 return this.el.select('textarea.form-control',true).first();