9 * @class Roo.bootstrap.Input
10 * @extends Roo.bootstrap.Component
11 * Bootstrap Input class
12 * @cfg {Boolean} disabled is it disabled
13 * @cfg {String} fieldLabel - the label associated
14 * @cfg {String} inputType button | checkbox | email | file | hidden | image | number | password | radio | range | reset | search | submit | text
15 * @cfg {String} name name of the input
16 * @cfg {boolean} disabled is it disabled
17 * @cfg {string} fieldLabel - the label associated
18 * @cfg {string} inputType - input / file submit ...
19 * @cfg {string} placeholder - placeholder to put in text.
20 * @cfg {string} before - input group add on before
21 * @cfg {string} after - input group add on after
26 * @param {Object} config The config object
29 Roo.bootstrap.Input = function(config){
30 Roo.bootstrap.Input.superclass.constructor.call(this, config);
34 Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component, {
44 getAutoCreate : function(){
46 var parent = this.parent();
48 var align = parent.labelAlign;
53 cls: 'form-group' //input-group
59 type : this.inputType,
61 placeholder : this.placeholder || ''
68 var inputblock = input;
70 if (this.before || this.after) {
79 cls : 'input-group-addon',
83 inputblock.cn.push(input);
87 cls : 'input-group-addon',
95 Roo.log(this.fieldLabel.length);
97 if (align ==='left' && this.fieldLabel.length) {
98 Roo.log("left and has label");
104 cls : 'col-sm-2 control-label',
105 html : this.fieldLabel
116 } else if ( this.fieldLabel.length) {
122 //cls : 'input-group-addon',
123 html : this.fieldLabel
133 Roo.log(" no label && no align");
152 setDisabled : function(v)
154 var i = this.el.select('input',true).dom;
156 i.removeAttribute('disabled');
160 i.setAttribute('disabled','true');