Changeset 698

Show
Ignore:
Timestamp:
12/14/07 23:08:50 (1 year ago)
Author:
laurentj
Message:

fixed a type in jResponseTcpdf, and fixed bug #368, many errors in jforms.js when some controls are not displayed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix-www/js/jforms.js

    r686 r698  
    5656        for(var i =0; i < f.controls.length; i++){ 
    5757            var c = f.controls[i]; 
    58             var val = this._getValue(frmElt.elements[c.name]); 
     58            var elt = frmElt.elements[c.name]; 
     59            if (!elt) continue; // sometimes, all controls are not generated... 
     60            var val = this._getValue(elt); 
    5961            if(val == ''){ 
    6062                if(c.required){ 
  • trunk/lib/jelix-www/js/jforms.js

    r686 r698  
    5656        for(var i =0; i < f.controls.length; i++){ 
    5757            var c = f.controls[i]; 
    58             var val = this._getValue(frmElt.elements[c.name]); 
     58            var elt = frmElt.elements[c.name]; 
     59            if (!elt) continue; // sometimes, all controls are not generated... 
     60            var val = this._getValue(elt); 
    5961            if(val == ''){ 
    6062                if(c.required){ 
  • trunk/lib/jelix/core/response/jResponseTcpdf.class.php

    r696 r698  
    103103    */ 
    104104    public function __call($method, $attr){ 
    105         if ($this->fpdf !== null){ 
    106             return call_user_func_array(array($this->fpdf, $method), $attr ); 
     105        if ($this->tcpdf !== null){ 
     106            return call_user_func_array(array($this->tcpdf, $method), $attr ); 
    107107        }else{ 
    108108            throw new jException('jelix~errors.reptcpdf.not_a_jtcpdf'); 
  • trunk/lib/jelix/core/response/jResponseTcpdf.class.php

    r696 r698  
    103103    */ 
    104104    public function __call($method, $attr){ 
    105         if ($this->fpdf !== null){ 
    106             return call_user_func_array(array($this->fpdf, $method), $attr ); 
     105        if ($this->tcpdf !== null){ 
     106            return call_user_func_array(array($this->tcpdf, $method), $attr ); 
    107107        }else{ 
    108108            throw new jException('jelix~errors.reptcpdf.not_a_jtcpdf'); 
Download in other formats: Unified Diff Zip Archive