Changeset 925

Show
Ignore:
Timestamp:
05/04/08 23:13:03 (3 months ago)
Author:
laurentj
Message:

ticket #551: jForms shouldn't get values from the request for readonly fields.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/lib/jelix/forms/jFormsBase.class.php

    r899 r925  
    7272 
    7373    /** 
    74      * says if the form is readonly 
    75      * @var boolean 
    76      */ 
    77     protected $_readOnly = false; 
    78  
    79     /** 
    8074     * content list of available form builder 
    8175     * @var boolean 
     
    108102        $req = $GLOBALS['gJCoord']->request; 
    109103        foreach($this->_controls as $name=>$ctrl){ 
     104            if($ctrl->readonly) continue; 
    110105            $value = $req->getParam($name); 
    111106            //@todo à prevoir un meilleur test, pour les formulaires sur plusieurs pages 
     
    406401 
    407402    /** 
    408      * set the form  read only or read/write 
    409      * @param boolean $r true if you want read only 
    410      */ 
    411     public function setReadOnly($r = true){  $this->_readOnly = $r;  } 
     403     * method not implemented... 
     404     * @param boolean $r  
     405     * @deprecated since 1.0.4 
     406     */ 
     407    public function setReadOnly($r = true){   } 
    412408 
    413409    /** 
  • branches/1.0.x/lib/jelix/forms/jFormsBase.class.php

    r899 r925  
    7272 
    7373    /** 
    74      * says if the form is readonly 
    75      * @var boolean 
    76      */ 
    77     protected $_readOnly = false; 
    78  
    79     /** 
    8074     * content list of available form builder 
    8175     * @var boolean 
     
    108102        $req = $GLOBALS['gJCoord']->request; 
    109103        foreach($this->_controls as $name=>$ctrl){ 
     104            if($ctrl->readonly) continue; 
    110105            $value = $req->getParam($name); 
    111106            //@todo à prevoir un meilleur test, pour les formulaires sur plusieurs pages 
     
    406401 
    407402    /** 
    408      * set the form  read only or read/write 
    409      * @param boolean $r true if you want read only 
    410      */ 
    411     public function setReadOnly($r = true){  $this->_readOnly = $r;  } 
     403     * method not implemented... 
     404     * @param boolean $r  
     405     * @deprecated since 1.0.4 
     406     */ 
     407    public function setReadOnly($r = true){   } 
    412408 
    413409    /** 
  • branches/1.0.x/lib/jelix/forms/jFormsBase.class.php

    r899 r925  
    7272 
    7373    /** 
    74      * says if the form is readonly 
    75      * @var boolean 
    76      */ 
    77     protected $_readOnly = false; 
    78  
    79     /** 
    8074     * content list of available form builder 
    8175     * @var boolean 
     
    108102        $req = $GLOBALS['gJCoord']->request; 
    109103        foreach($this->_controls as $name=>$ctrl){ 
     104            if($ctrl->readonly) continue; 
    110105            $value = $req->getParam($name); 
    111106            //@todo à prevoir un meilleur test, pour les formulaires sur plusieurs pages 
     
    406401 
    407402    /** 
    408      * set the form  read only or read/write 
    409      * @param boolean $r true if you want read only 
    410      */ 
    411     public function setReadOnly($r = true){  $this->_readOnly = $r;  } 
     403     * method not implemented... 
     404     * @param boolean $r  
     405     * @deprecated since 1.0.4 
     406     */ 
     407    public function setReadOnly($r = true){   } 
    412408 
    413409    /** 
  • branches/1.0.x/lib/jelix/forms/jFormsBase.class.php

    r899 r925  
    7272 
    7373    /** 
    74      * says if the form is readonly 
    75      * @var boolean 
    76      */ 
    77     protected $_readOnly = false; 
    78  
    79     /** 
    8074     * content list of available form builder 
    8175     * @var boolean 
     
    108102        $req = $GLOBALS['gJCoord']->request; 
    109103        foreach($this->_controls as $name=>$ctrl){ 
     104            if($ctrl->readonly) continue; 
    110105            $value = $req->getParam($name); 
    111106            //@todo à prevoir un meilleur test, pour les formulaires sur plusieurs pages 
     
    406401 
    407402    /** 
    408      * set the form  read only or read/write 
    409      * @param boolean $r true if you want read only 
    410      */ 
    411     public function setReadOnly($r = true){  $this->_readOnly = $r;  } 
     403     * method not implemented... 
     404     * @param boolean $r  
     405     * @deprecated since 1.0.4 
     406     */ 
     407    public function setReadOnly($r = true){   } 
    412408 
    413409    /** 
  • trunk/lib/jelix/forms/jFormsBase.class.php

    r906 r925  
    132132        $this->_modifiedControls=array(); 
    133133        foreach($this->_controls as $name=>$ctrl){ 
    134             if(!$this->_container->isActivated($name)
     134            if(!$this->_container->isActivated($name) || $ctrl->readonly
    135135                continue; 
    136136            $value = $req->getParam($name); 
  • trunk/lib/jelix/forms/jFormsBase.class.php

    r906 r925  
    132132        $this->_modifiedControls=array(); 
    133133        foreach($this->_controls as $name=>$ctrl){ 
    134             if(!$this->_container->isActivated($name)
     134            if(!$this->_container->isActivated($name) || $ctrl->readonly
    135135                continue; 
    136136            $value = $req->getParam($name); 
  • trunk/lib/jelix/forms/jFormsBase.class.php

    r906 r925  
    132132        $this->_modifiedControls=array(); 
    133133        foreach($this->_controls as $name=>$ctrl){ 
    134             if(!$this->_container->isActivated($name)
     134            if(!$this->_container->isActivated($name) || $ctrl->readonly
    135135                continue; 
    136136            $value = $req->getParam($name); 
  • trunk/lib/jelix/forms/jFormsBase.class.php

    r906 r925  
    132132        $this->_modifiedControls=array(); 
    133133        foreach($this->_controls as $name=>$ctrl){ 
    134             if(!$this->_container->isActivated($name)
     134            if(!$this->_container->isActivated($name) || $ctrl->readonly
    135135                continue; 
    136136            $value = $req->getParam($name); 
Download in other formats: Unified Diff Zip Archive