Changeset 1510 for branches/3.0

Show
Ignore:
Timestamp:
11/25/2006 03:13:03 PM (2 years ago)
Author:
xue
Message:

Fixed #460.

Location:
branches/3.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/3.0/HISTORY

    r1508 r1510  
    55ENH: Ticket#446 - Added TMetaTagCollection.getMetaTagByID method (Qiang) 
    66CHG: Ticket#437 - __autoload is replaced by spl_autoload_register (Qiang) 
    7 CHG: Ticket#454 - Redundant PHP Version Check 
     7CHG: Ticket#454 - Redundant PHP Version Check (Qiang) 
     8CHG: Ticket#460 - Validators will not perform validation if parents are disabled (Qiang) 
    89CHG: TRepeater does not render <span> anymore for empty item template (Qiang) 
    910CHG: THttpRequest.constructUrl() now encodes ampersand by default (Qiang) 
  • branches/3.0/framework/Web/UI/WebControls/TBaseValidator.php

    r1397 r1510  
    483483        public function validate() 
    484484        { 
    485                 if($visible=$this->getVisible(true)) 
     485                $this->setIsValid(true); 
     486                if($this->getVisible(true) && $this->getEnabled(true)) 
     487                { 
    486488                        $this->onValidate(); 
    487                 $this->setIsValid(true); 
    488                 if($this->getValidationTarget() && $visible && $this->getEnabled()) 
    489                 { 
    490                         if($this->evaluateIsValid()) 
     489                        if($this->getValidationTarget()) 
    491490                        { 
    492                                 $this->setIsValid(true); 
    493                                 $this->onSuccess(); 
    494                         } 
    495                         else 
    496                         { 
    497                                 $this->setIsValid(false); 
    498                                 $this->onError(); 
     491                                if($this->evaluateIsValid()) 
     492                                { 
     493                                        $this->setIsValid(true); 
     494                                        $this->onSuccess(); 
     495                                } 
     496                                else 
     497                                { 
     498                                        $this->setIsValid(false); 
     499                                        $this->onError(); 
     500                                } 
    499501                        } 
    500502                }