Roo/bootstrap/CheckBox.js
authoredward <edward@roojs.com>
Fri, 25 Aug 2017 06:01:14 +0000 (14:01 +0800)
committeredward <edward@roojs.com>
Fri, 25 Aug 2017 06:01:14 +0000 (14:01 +0800)
Roo/bootstrap/CheckBox.js

index 954b058..edcac70 100644 (file)
@@ -500,13 +500,12 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         
         var _this = this;
         
-        Roo.each(this.el.up('form').select('input[name='+this.name+']', true).elements, function(e){
-            this.getActionEl().addClass(this.disabledClass);
-            this.el.dom.disabled = true;
-        
-            e.findParent('.form-group', false, true).removeClass([_this.invalidClass, _this.validClass]);
-            e.findParent('.form-group', false, true).addClass(_this.invalidClass);
-        });
+        if(this.rendered){
+            Roo.each(this.el.up('form').select('input[name='+this.name+']', true).elements, function(e){
+                _this.getActionEl().addClass(this.disabledClass);
+                _this.el.dom.disabled = true;
+            });
+        }
         
         this.disabled = true;
         this.fireEvent("disable", this);