projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove required for allowBlank
[roojs1]
/
Roo
/
bootstrap
/
ComboBox.js
diff --git
a/Roo/bootstrap/ComboBox.js
b/Roo/bootstrap/ComboBox.js
index
21c9aef
..
8582874
100644
(file)
--- a/
Roo/bootstrap/ComboBox.js
+++ b/
Roo/bootstrap/ComboBox.js
@@
-2327,16
+2327,21
@@
Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
combobox.cls += ' roo-select2-container-multi';
}
combobox.cls += ' roo-select2-container-multi';
}
+ var required = this.allowBlank ? {
+ tag : 'i',
+ style: 'display: none'
+ } : {
+ tag : 'i',
+ cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
+ tooltip : 'This field is required'
+ };
+
var align = this.labelAlign || this.parentLabelAlign();
if (align ==='left' && this.fieldLabel.length) {
cfg.cn = [
var align = this.labelAlign || this.parentLabelAlign();
if (align ==='left' && this.fieldLabel.length) {
cfg.cn = [
- {
- tag : 'i',
- cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
- tooltip : 'This field is required'
- },
+ required,
{
tag: 'label',
cls : 'control-label col-form-label',
{
tag: 'label',
cls : 'control-label col-form-label',
@@
-2366,11
+2371,7
@@
Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
tag : 'span',
html : this.fieldLabel
},
tag : 'span',
html : this.fieldLabel
},
- {
- tag : 'i',
- cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
- tooltip : 'This field is required'
- }
+ required
]
},
{
]
},
{
@@
-2419,11
+2420,7
@@
Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
} else if ( this.fieldLabel.length) {
cfg.cn = [
} else if ( this.fieldLabel.length) {
cfg.cn = [
- {
- tag : 'i',
- cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
- tooltip : 'This field is required'
- },
+ required,
{
tag: 'label',
cls : 'control-label',
{
tag: 'label',
cls : 'control-label',
@@
-2445,11
+2442,7
@@
Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
cls : 'control-label',
html : this.fieldLabel,
cn : [
cls : 'control-label',
html : this.fieldLabel,
cn : [
- {
- tag : 'i',
- cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
- tooltip : 'This field is required'
- }
+ required
]
},
{
]
},
{