X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fbootstrap%2Fform%2FInput.js;h=96fe412ad5a3636ec9a3c7d616fbe6310ef504ba;hb=3256a084e9b46eea3233fd11b7f2f2612b71501a;hp=3b43fc2b7ec14e8ddbaafc2f896d117f69ad955d;hpb=33e0a4a8b3d946e79df0554162e9b524db58a3b3;p=roojs1 diff --git a/Roo/bootstrap/form/Input.js b/Roo/bootstrap/form/Input.js index 3b43fc2b7e..96fe412ad5 100644 --- a/Roo/bootstrap/form/Input.js +++ b/Roo/bootstrap/form/Input.js @@ -273,7 +273,6 @@ Roo.extend(Roo.bootstrap.form.Input, Roo.bootstrap.Component, { getAutoCreate : function() { - var align = (!this.labelAlign) ? this.parentLabelAlign() : this.labelAlign; var id = Roo.id(); @@ -402,6 +401,34 @@ Roo.extend(Roo.bootstrap.form.Input, Roo.bootstrap.Component, { inputblock.cn.push(feedback); } }; + + + + cfg = this.getAutoCreateLabel( cfg, inputblock ); + + + + + if (this.parentType === 'Navbar' && this.parent().bar) { + cfg.cls += ' navbar-form'; + } + + if (this.parentType === 'NavGroup' && !(Roo.bootstrap.version == 4 && this.parent().form)) { + // on BS4 we do this only if not form + cfg.cls += ' navbar-form'; + cfg.tag = 'li'; + } + + return cfg; + + }, + /** + * autocreate the label - also used by textara... ?? and others? + */ + getAutoCreateLabel : function( cfg, inputblock ) + { + var align = (!this.labelAlign) ? this.parentLabelAlign() : this.labelAlign; + var indicator = { tag : 'i', cls : 'roo-required-indicator ' + (this.indicatorpos == 'right' ? 'right' : 'left') +'-indicator text-danger fa fa-lg fa-star', @@ -545,20 +572,10 @@ Roo.extend(Roo.bootstrap.form.Input, Roo.bootstrap.Component, { }; - - if (this.parentType === 'Navbar' && this.parent().bar) { - cfg.cls += ' navbar-form'; - } - - if (this.parentType === 'NavGroup' && !(Roo.bootstrap.version == 4 && this.parent().form)) { - // on BS4 we do this only if not form - cfg.cls += ' navbar-form'; - cfg.tag = 'li'; - } - return cfg; - }, + + /** * return the real input element. */