Changeset 946

Show
Ignore:
Timestamp:
05/27/08 17:29:06 (6 months ago)
Author:
julieni
Message:

ticket #592: form plugin create always a form with method post

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/lib/jelix/CREDITS

    r940 r946  
    7272 - jForms html shouldn't generate readonly attribute on select (#550) 
    7373 - jResponseZip : on windows files are view like folders (#538) 
     74 - form plugin create always a form with method post (#592) 
    7475 
    7576Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/CREDITS

    r940 r946  
    7272 - jForms html shouldn't generate readonly attribute on select (#550) 
    7373 - jResponseZip : on windows files are view like folders (#538) 
     74 - form plugin create always a form with method post (#592) 
    7475 
    7576Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/CREDITS

    r940 r946  
    7272 - jForms html shouldn't generate readonly attribute on select (#550) 
    7373 - jResponseZip : on windows files are view like folders (#538) 
     74 - form plugin create always a form with method post (#592) 
    7475 
    7576Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/CREDITS

    r940 r946  
    7272 - jForms html shouldn't generate readonly attribute on select (#550) 
    7373 - jResponseZip : on windows files are view like folders (#538) 
     74 - form plugin create always a form with method post (#592) 
    7475 
    7576Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r943 r946  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        $method = (strtolower($params[2])=='get')?'get':'post'; 
     114        echo '<form action="',$url->getPath(),'" method="'.$method.'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114115        if($this->_form->hasUpload()) 
    115116            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r943 r946  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        $method = (strtolower($params[2])=='get')?'get':'post'; 
     114        echo '<form action="',$url->getPath(),'" method="'.$method.'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114115        if($this->_form->hasUpload()) 
    115116            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r943 r946  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        $method = (strtolower($params[2])=='get')?'get':'post'; 
     114        echo '<form action="',$url->getPath(),'" method="'.$method.'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114115        if($this->_form->hasUpload()) 
    115116            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r943 r946  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        $method = (strtolower($params[2])=='get')?'get':'post'; 
     114        echo '<form action="',$url->getPath(),'" method="'.$method.'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114115        if($this->_form->hasUpload()) 
    115116            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/block.form.php

    r924 r946  
    44* @subpackage  jtpl_plugin 
    55* @author      Jouanneau Laurent 
     6* @contributor Julien Issler 
    67* @copyright   2006-2007 Jouanneau laurent 
     8* @copyright   2008 Julien Issler 
    79* @link        http://www.jelix.org 
    810* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5860        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5961 
    60     $method = strtolower(isset($param[5])?$param[5]:'post'); 
    61     if($method!='get' && $method!='post') 
    62         $method='post'; 
     62    $method = isset($param[5])?$param[5]:'\'post\''; 
    6363 
    6464    $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
    6565$t->_privateVars[\'__formbuilder\'] = $t->_privateVars[\'__form\']->getBuilder(\'html\', '.$param[1].','.$param[2].'); 
    66 $t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     66$t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6767$t->_privateVars[\'__displayed_ctrl\'] = array(); 
    6868'; 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/block.form.php

    r924 r946  
    44* @subpackage  jtpl_plugin 
    55* @author      Jouanneau Laurent 
     6* @contributor Julien Issler 
    67* @copyright   2006-2007 Jouanneau laurent 
     8* @copyright   2008 Julien Issler 
    79* @link        http://www.jelix.org 
    810* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5860        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5961 
    60     $method = strtolower(isset($param[5])?$param[5]:'post'); 
    61     if($method!='get' && $method!='post') 
    62         $method='post'; 
     62    $method = isset($param[5])?$param[5]:'\'post\''; 
    6363 
    6464    $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
    6565$t->_privateVars[\'__formbuilder\'] = $t->_privateVars[\'__form\']->getBuilder(\'html\', '.$param[1].','.$param[2].'); 
    66 $t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     66$t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6767$t->_privateVars[\'__displayed_ctrl\'] = array(); 
    6868'; 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/block.form.php

    r924 r946  
    44* @subpackage  jtpl_plugin 
    55* @author      Jouanneau Laurent 
     6* @contributor Julien Issler 
    67* @copyright   2006-2007 Jouanneau laurent 
     8* @copyright   2008 Julien Issler 
    79* @link        http://www.jelix.org 
    810* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5860        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5961 
    60     $method = strtolower(isset($param[5])?$param[5]:'post'); 
    61     if($method!='get' && $method!='post') 
    62         $method='post'; 
     62    $method = isset($param[5])?$param[5]:'\'post\''; 
    6363 
    6464    $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
    6565$t->_privateVars[\'__formbuilder\'] = $t->_privateVars[\'__form\']->getBuilder(\'html\', '.$param[1].','.$param[2].'); 
    66 $t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     66$t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6767$t->_privateVars[\'__displayed_ctrl\'] = array(); 
    6868'; 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/block.form.php

    r924 r946  
    44* @subpackage  jtpl_plugin 
    55* @author      Jouanneau Laurent 
     6* @contributor Julien Issler 
    67* @copyright   2006-2007 Jouanneau laurent 
     8* @copyright   2008 Julien Issler 
    79* @link        http://www.jelix.org 
    810* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5860        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5961 
    60     $method = strtolower(isset($param[5])?$param[5]:'post'); 
    61     if($method!='get' && $method!='post') 
    62         $method='post'; 
     62    $method = isset($param[5])?$param[5]:'\'post\''; 
    6363 
    6464    $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
    6565$t->_privateVars[\'__formbuilder\'] = $t->_privateVars[\'__form\']->getBuilder(\'html\', '.$param[1].','.$param[2].'); 
    66 $t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     66$t->_privateVars[\'__formbuilder\']->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6767$t->_privateVars[\'__displayed_ctrl\'] = array(); 
    6868'; 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r924 r946  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007 Laurent Jouanneau, 2007 Dominique Papin 
     8* @copyright    2008 Julien Issler 
    89* @link         http://www.jelix.org 
    910* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5253        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5354 
    54     $method = strtolower(isset($params[5])?$params[5]:'post'); 
    55     if($method!='get' && $method!='post') 
    56         $method='post'; 
     55    $method = isset($param[5])?$param[5]:'\'post\''; 
    5756 
    5857    $content = ' $formfull = '.$params[0].'; 
    5958    $formfullBuilder = $formfull->getBuilder(\'html\', '.$params[1].','.$params[2].'); 
    60     $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     59    $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6160    echo \'<table class="jforms-table" border="0">\'; 
    6261 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r924 r946  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007 Laurent Jouanneau, 2007 Dominique Papin 
     8* @copyright    2008 Julien Issler 
    89* @link         http://www.jelix.org 
    910* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5253        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5354 
    54     $method = strtolower(isset($params[5])?$params[5]:'post'); 
    55     if($method!='get' && $method!='post') 
    56         $method='post'; 
     55    $method = isset($param[5])?$param[5]:'\'post\''; 
    5756 
    5857    $content = ' $formfull = '.$params[0].'; 
    5958    $formfullBuilder = $formfull->getBuilder(\'html\', '.$params[1].','.$params[2].'); 
    60     $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     59    $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6160    echo \'<table class="jforms-table" border="0">\'; 
    6261 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r924 r946  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007 Laurent Jouanneau, 2007 Dominique Papin 
     8* @copyright    2008 Julien Issler 
    89* @link         http://www.jelix.org 
    910* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5253        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5354 
    54     $method = strtolower(isset($params[5])?$params[5]:'post'); 
    55     if($method!='get' && $method!='post') 
    56         $method='post'; 
     55    $method = isset($param[5])?$param[5]:'\'post\''; 
    5756 
    5857    $content = ' $formfull = '.$params[0].'; 
    5958    $formfullBuilder = $formfull->getBuilder(\'html\', '.$params[1].','.$params[2].'); 
    60     $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     59    $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6160    echo \'<table class="jforms-table" border="0">\'; 
    6261 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/cfunction.formfull.php

    r924 r946  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007 Laurent Jouanneau, 2007 Dominique Papin 
     8* @copyright    2008 Julien Issler 
    89* @link         http://www.jelix.org 
    910* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5253        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5354 
    54     $method = strtolower(isset($params[5])?$params[5]:'post'); 
    55     if($method!='get' && $method!='post') 
    56         $method='post'; 
     55    $method = isset($param[5])?$param[5]:'\'post\''; 
    5756 
    5857    $content = ' $formfull = '.$params[0].'; 
    5958    $formfullBuilder = $formfull->getBuilder(\'html\', '.$params[1].','.$params[2].'); 
    60     $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.',\''.$method.'\')); 
     59    $formfullBuilder->outputHeader(array('.$errdecorator.','.$helpdecorator.','.$method.')); 
    6160    echo \'<table class="jforms-table" border="0">\'; 
    6261 
Download in other formats: Unified Diff Zip Archive