Changeset 750
- Timestamp:
- 01/21/08 10:43:30 (11 months ago)
- Files:
-
- branches/1.0.x/lib/jelix/auth/jAuth.class.php (modified) (5 diffs)
- branches/1.0.x/lib/jelix/auth/jAuth.class.php (modified) (5 diffs)
- branches/1.0.x/lib/jelix/auth/jAuth.class.php (modified) (5 diffs)
- branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- branches/1.0.x/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist (modified) (1 diff)
- branches/1.0.x/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist (modified) (1 diff)
- branches/1.0.x/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist (modified) (1 diff)
- branches/1.0.x/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php (modified) (3 diffs)
- branches/1.0.x/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php (modified) (3 diffs)
- branches/1.0.x/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php (modified) (3 diffs)
- trunk/lib/jelix/auth/jAuth.class.php (modified) (5 diffs)
- trunk/lib/jelix/auth/jAuth.class.php (modified) (5 diffs)
- trunk/lib/jelix/auth/jAuth.class.php (modified) (5 diffs)
- trunk/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- trunk/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist (modified) (1 diff)
- trunk/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist (modified) (1 diff)
- trunk/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0.x/lib/jelix/auth/jAuth.class.php
r705 r750 5 5 * @author Laurent Jouanneau 6 6 * @contributor Frédéric Guillot, Antoine Detante, Julien Issler 7 * @copyright 2001-2005 CopixTeam, 2005-200 7Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante7 * @copyright 2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante 8 8 * @copyright 2007 Julien Issler 9 9 * … … 117 117 $config['session_name'] = 'JELIX_USER'; 118 118 } 119 if (!isset( $config['persistant_cookie_path']) 120 || $config['persistant_cookie_path'] == '') { 121 $config['persistant_cookie_path'] = $GLOBALS['gJConfig']->urlengine['basePath']; 122 } 123 119 124 } 120 125 return $config; … … 311 316 $cookieDuration+=time(); 312 317 $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']); 313 setcookie($config['persistant_cookie_name'].'[login]', $login,$cookieDuration);314 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword,$cookieDuration);318 setcookie($config['persistant_cookie_name'].'[login]', $login, $cookieDuration, $config['persistant_cookie_path']); 319 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $cookieDuration, $config['persistant_cookie_path']); 315 320 } 316 321 return true; … … 318 323 return false; 319 324 } 320 325 321 326 /** 322 327 * Check if persistant session is enabled in config … … 343 348 if(!isset($config['persistant_cookie_name'])) 344 349 throw new jException('jelix~auth.error.persistant.incorrectconfig','persistant_cookie_name, persistant_crypt_key'); 345 setcookie($config['persistant_cookie_name'].'[login]' );346 setcookie($config['persistant_cookie_name'].'[passwd]' );350 setcookie($config['persistant_cookie_name'].'[login]', '', time() - 3600, $config['persistant_cookie_path']); 351 setcookie($config['persistant_cookie_name'].'[passwd]', '', time() - 3600, $config['persistant_cookie_path']); 347 352 } 348 353 } branches/1.0.x/lib/jelix/auth/jAuth.class.php
r705 r750 5 5 * @author Laurent Jouanneau 6 6 * @contributor Frédéric Guillot, Antoine Detante, Julien Issler 7 * @copyright 2001-2005 CopixTeam, 2005-200 7Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante7 * @copyright 2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante 8 8 * @copyright 2007 Julien Issler 9 9 * … … 117 117 $config['session_name'] = 'JELIX_USER'; 118 118 } 119 if (!isset( $config['persistant_cookie_path']) 120 || $config['persistant_cookie_path'] == '') { 121 $config['persistant_cookie_path'] = $GLOBALS['gJConfig']->urlengine['basePath']; 122 } 123 119 124 } 120 125 return $config; … … 311 316 $cookieDuration+=time(); 312 317 $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']); 313 setcookie($config['persistant_cookie_name'].'[login]', $login,$cookieDuration);314 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword,$cookieDuration);318 setcookie($config['persistant_cookie_name'].'[login]', $login, $cookieDuration, $config['persistant_cookie_path']); 319 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $cookieDuration, $config['persistant_cookie_path']); 315 320 } 316 321 return true; … … 318 323 return false; 319 324 } 320 325 321 326 /** 322 327 * Check if persistant session is enabled in config … … 343 348 if(!isset($config['persistant_cookie_name'])) 344 349 throw new jException('jelix~auth.error.persistant.incorrectconfig','persistant_cookie_name, persistant_crypt_key'); 345 setcookie($config['persistant_cookie_name'].'[login]' );346 setcookie($config['persistant_cookie_name'].'[passwd]' );350 setcookie($config['persistant_cookie_name'].'[login]', '', time() - 3600, $config['persistant_cookie_path']); 351 setcookie($config['persistant_cookie_name'].'[passwd]', '', time() - 3600, $config['persistant_cookie_path']); 347 352 } 348 353 } branches/1.0.x/lib/jelix/auth/jAuth.class.php
r705 r750 5 5 * @author Laurent Jouanneau 6 6 * @contributor Frédéric Guillot, Antoine Detante, Julien Issler 7 * @copyright 2001-2005 CopixTeam, 2005-200 7Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante7 * @copyright 2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante 8 8 * @copyright 2007 Julien Issler 9 9 * … … 117 117 $config['session_name'] = 'JELIX_USER'; 118 118 } 119 if (!isset( $config['persistant_cookie_path']) 120 || $config['persistant_cookie_path'] == '') { 121 $config['persistant_cookie_path'] = $GLOBALS['gJConfig']->urlengine['basePath']; 122 } 123 119 124 } 120 125 return $config; … … 311 316 $cookieDuration+=time(); 312 317 $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']); 313 setcookie($config['persistant_cookie_name'].'[login]', $login,$cookieDuration);314 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword,$cookieDuration);318 setcookie($config['persistant_cookie_name'].'[login]', $login, $cookieDuration, $config['persistant_cookie_path']); 319 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $cookieDuration, $config['persistant_cookie_path']); 315 320 } 316 321 return true; … … 318 323 return false; 319 324 } 320 325 321 326 /** 322 327 * Check if persistant session is enabled in config … … 343 348 if(!isset($config['persistant_cookie_name'])) 344 349 throw new jException('jelix~auth.error.persistant.incorrectconfig','persistant_cookie_name, persistant_crypt_key'); 345 setcookie($config['persistant_cookie_name'].'[login]' );346 setcookie($config['persistant_cookie_name'].'[passwd]' );350 setcookie($config['persistant_cookie_name'].'[login]', '', time() - 3600, $config['persistant_cookie_path']); 351 setcookie($config['persistant_cookie_name'].'[passwd]', '', time() - 3600, $config['persistant_cookie_path']); 347 352 } 348 353 } branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php
r748 r750 313 313 case 'submit': 314 314 if($ctrl->standalone){ 315 echo '<input type="submit"',$id,$hint,' value="',htmlspecialchars($ctrl->label),'"/>';315 echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 316 316 }else{ 317 317 foreach($ctrl->datasource->getDatas() as $v=>$label){ 318 318 // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"',$hint,' value="',htmlspecialchars($label),'"/> '; 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 320 $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 320 321 } 321 322 } 322 323 break; 323 324 case 'reset': 324 echo '<button type="reset"',$id,$hint,' >',htmlspecialchars($ctrl->label),'</button>';325 echo '<button type="reset"',$id,$hint,' class="jforms-reset">',htmlspecialchars($ctrl->label),'</button>'; 325 326 break; 326 327 } branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php
r748 r750 313 313 case 'submit': 314 314 if($ctrl->standalone){ 315 echo '<input type="submit"',$id,$hint,' value="',htmlspecialchars($ctrl->label),'"/>';315 echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 316 316 }else{ 317 317 foreach($ctrl->datasource->getDatas() as $v=>$label){ 318 318 // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"',$hint,' value="',htmlspecialchars($label),'"/> '; 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 320 $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 320 321 } 321 322 } 322 323 break; 323 324 case 'reset': 324 echo '<button type="reset"',$id,$hint,' >',htmlspecialchars($ctrl->label),'</button>';325 echo '<button type="reset"',$id,$hint,' class="jforms-reset">',htmlspecialchars($ctrl->label),'</button>'; 325 326 break; 326 327 } branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php
r748 r750 313 313 case 'submit': 314 314 if($ctrl->standalone){ 315 echo '<input type="submit"',$id,$hint,' value="',htmlspecialchars($ctrl->label),'"/>';315 echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 316 316 }else{ 317 317 foreach($ctrl->datasource->getDatas() as $v=>$label){ 318 318 // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"',$hint,' value="',htmlspecialchars($label),'"/> '; 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 320 $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 320 321 } 321 322 } 322 323 break; 323 324 case 'reset': 324 echo '<button type="reset"',$id,$hint,' >',htmlspecialchars($ctrl->label),'</button>';325 echo '<button type="reset"',$id,$hint,' class="jforms-reset">',htmlspecialchars($ctrl->label),'</button>'; 325 326 break; 326 327 } branches/1.0.x/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
r717 r750 71 71 persistant_duration = 1 72 72 73 ; base path for the cookie. If empty, it uses the basePath value from the main configuration. 74 persistant_cookie_path = 75 73 76 ;=========== Parameters for drivers 74 77 branches/1.0.x/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
r717 r750 71 71 persistant_duration = 1 72 72 73 ; base path for the cookie. If empty, it uses the basePath value from the main configuration. 74 persistant_cookie_path = 75 73 76 ;=========== Parameters for drivers 74 77 branches/1.0.x/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
r717 r750 71 71 persistant_duration = 1 72 72 73 ; base path for the cookie. If empty, it uses the basePath value from the main configuration. 74 persistant_cookie_path = 75 73 76 ;=========== Parameters for drivers 74 77 branches/1.0.x/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php
r748 r750 600 600 601 601 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" value="Votre nom"/>', $out);602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-submit" value="Votre nom"/>', $out); 611 611 612 612 $ctrl->standalone=false; … … 615 615 616 616 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" value="Sauvegarde"/> ';618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" value="Preview"/> ';617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" class="jforms-submit" value="Sauvegarde"/> '; 618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" class="jforms-submit" value="Preview"/> '; 619 619 $this->assertEqualOrDiff($output, $out); 620 620 } … … 628 628 629 629 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 638 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" >Votre nom</button>', $out);630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" class="jforms-reset">Votre nom</button>', $out); 631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" class="jforms-reset">Votre nom</button>', $out); 635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 638 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-reset">Votre nom</button>', $out); 639 639 } 640 640 branches/1.0.x/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php
r748 r750 600 600 601 601 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" value="Votre nom"/>', $out);602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-submit" value="Votre nom"/>', $out); 611 611 612 612 $ctrl->standalone=false; … … 615 615 616 616 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" value="Sauvegarde"/> ';618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" value="Preview"/> ';617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" class="jforms-submit" value="Sauvegarde"/> '; 618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" class="jforms-submit" value="Preview"/> '; 619 619 $this->assertEqualOrDiff($output, $out); 620 620 } … … 628 628 629 629 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 638 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" >Votre nom</button>', $out);630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" class="jforms-reset">Votre nom</button>', $out); 631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" class="jforms-reset">Votre nom</button>', $out); 635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 638 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-reset">Votre nom</button>', $out); 639 639 } 640 640 branches/1.0.x/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php
r748 r750 600 600 601 601 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" value="Votre nom"/>', $out);602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-submit" value="Votre nom"/>', $out); 611 611 612 612 $ctrl->standalone=false; … … 615 615 616 616 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" value="Sauvegarde"/> ';618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" value="Preview"/> ';617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" class="jforms-submit" value="Sauvegarde"/> '; 618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" class="jforms-submit" value="Preview"/> '; 619 619 $this->assertEqualOrDiff($output, $out); 620 620 } … … 628 628 629 629 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 638 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" >Votre nom</button>', $out);630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" class="jforms-reset">Votre nom</button>', $out); 631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" class="jforms-reset">Votre nom</button>', $out); 635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 638 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-reset">Votre nom</button>', $out); 639 639 } 640 640 trunk/lib/jelix/auth/jAuth.class.php
r705 r750 5 5 * @author Laurent Jouanneau 6 6 * @contributor Frédéric Guillot, Antoine Detante, Julien Issler 7 * @copyright 2001-2005 CopixTeam, 2005-200 7Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante7 * @copyright 2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante 8 8 * @copyright 2007 Julien Issler 9 9 * … … 117 117 $config['session_name'] = 'JELIX_USER'; 118 118 } 119 if (!isset( $config['persistant_cookie_path']) 120 || $config['persistant_cookie_path'] == '') { 121 $config['persistant_cookie_path'] = $GLOBALS['gJConfig']->urlengine['basePath']; 122 } 123 119 124 } 120 125 return $config; … … 311 316 $cookieDuration+=time(); 312 317 $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']); 313 setcookie($config['persistant_cookie_name'].'[login]', $login,$cookieDuration);314 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword,$cookieDuration);318 setcookie($config['persistant_cookie_name'].'[login]', $login, $cookieDuration, $config['persistant_cookie_path']); 319 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $cookieDuration, $config['persistant_cookie_path']); 315 320 } 316 321 return true; … … 318 323 return false; 319 324 } 320 325 321 326 /** 322 327 * Check if persistant session is enabled in config … … 343 348 if(!isset($config['persistant_cookie_name'])) 344 349 throw new jException('jelix~auth.error.persistant.incorrectconfig','persistant_cookie_name, persistant_crypt_key'); 345 setcookie($config['persistant_cookie_name'].'[login]' );346 setcookie($config['persistant_cookie_name'].'[passwd]' );350 setcookie($config['persistant_cookie_name'].'[login]', '', time() - 3600, $config['persistant_cookie_path']); 351 setcookie($config['persistant_cookie_name'].'[passwd]', '', time() - 3600, $config['persistant_cookie_path']); 347 352 } 348 353 } trunk/lib/jelix/auth/jAuth.class.php
r705 r750 5 5 * @author Laurent Jouanneau 6 6 * @contributor Frédéric Guillot, Antoine Detante, Julien Issler 7 * @copyright 2001-2005 CopixTeam, 2005-200 7Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante7 * @copyright 2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante 8 8 * @copyright 2007 Julien Issler 9 9 * … … 117 117 $config['session_name'] = 'JELIX_USER'; 118 118 } 119 if (!isset( $config['persistant_cookie_path']) 120 || $config['persistant_cookie_path'] == '') { 121 $config['persistant_cookie_path'] = $GLOBALS['gJConfig']->urlengine['basePath']; 122 } 123 119 124 } 120 125 return $config; … … 311 316 $cookieDuration+=time(); 312 317 $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']); 313 setcookie($config['persistant_cookie_name'].'[login]', $login,$cookieDuration);314 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword,$cookieDuration);318 setcookie($config['persistant_cookie_name'].'[login]', $login, $cookieDuration, $config['persistant_cookie_path']); 319 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $cookieDuration, $config['persistant_cookie_path']); 315 320 } 316 321 return true; … … 318 323 return false; 319 324 } 320 325 321 326 /** 322 327 * Check if persistant session is enabled in config … … 343 348 if(!isset($config['persistant_cookie_name'])) 344 349 throw new jException('jelix~auth.error.persistant.incorrectconfig','persistant_cookie_name, persistant_crypt_key'); 345 setcookie($config['persistant_cookie_name'].'[login]' );346 setcookie($config['persistant_cookie_name'].'[passwd]' );350 setcookie($config['persistant_cookie_name'].'[login]', '', time() - 3600, $config['persistant_cookie_path']); 351 setcookie($config['persistant_cookie_name'].'[passwd]', '', time() - 3600, $config['persistant_cookie_path']); 347 352 } 348 353 } trunk/lib/jelix/auth/jAuth.class.php
r705 r750 5 5 * @author Laurent Jouanneau 6 6 * @contributor Frédéric Guillot, Antoine Detante, Julien Issler 7 * @copyright 2001-2005 CopixTeam, 2005-200 7Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante7 * @copyright 2001-2005 CopixTeam, 2005-2008 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante 8 8 * @copyright 2007 Julien Issler 9 9 * … … 117 117 $config['session_name'] = 'JELIX_USER'; 118 118 } 119 if (!isset( $config['persistant_cookie_path']) 120 || $config['persistant_cookie_path'] == '') { 121 $config['persistant_cookie_path'] = $GLOBALS['gJConfig']->urlengine['basePath']; 122 } 123 119 124 } 120 125 return $config; … … 311 316 $cookieDuration+=time(); 312 317 $encryptedPassword=jCrypt::encrypt($password,$config['persistant_crypt_key']); 313 setcookie($config['persistant_cookie_name'].'[login]', $login,$cookieDuration);314 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword,$cookieDuration);318 setcookie($config['persistant_cookie_name'].'[login]', $login, $cookieDuration, $config['persistant_cookie_path']); 319 setcookie($config['persistant_cookie_name'].'[passwd]', $encryptedPassword, $cookieDuration, $config['persistant_cookie_path']); 315 320 } 316 321 return true; … … 318 323 return false; 319 324 } 320 325 321 326 /** 322 327 * Check if persistant session is enabled in config … … 343 348 if(!isset($config['persistant_cookie_name'])) 344 349 throw new jException('jelix~auth.error.persistant.incorrectconfig','persistant_cookie_name, persistant_crypt_key'); 345 setcookie($config['persistant_cookie_name'].'[login]' );346 setcookie($config['persistant_cookie_name'].'[passwd]' );350 setcookie($config['persistant_cookie_name'].'[login]', '', time() - 3600, $config['persistant_cookie_path']); 351 setcookie($config['persistant_cookie_name'].'[passwd]', '', time() - 3600, $config['persistant_cookie_path']); 347 352 } 348 353 } trunk/lib/jelix/forms/jFormsBuilderBase.class.php
r748 r750 313 313 case 'submit': 314 314 if($ctrl->standalone){ 315 echo '<input type="submit"',$id,$hint,' value="',htmlspecialchars($ctrl->label),'"/>';315 echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 316 316 }else{ 317 317 foreach($ctrl->datasource->getDatas() as $v=>$label){ 318 318 // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"',$hint,' value="',htmlspecialchars($label),'"/> '; 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 320 $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 320 321 } 321 322 } 322 323 break; 323 324 case 'reset': 324 echo '<button type="reset"',$id,$hint,' >',htmlspecialchars($ctrl->label),'</button>';325 echo '<button type="reset"',$id,$hint,' class="jforms-reset">',htmlspecialchars($ctrl->label),'</button>'; 325 326 break; 326 327 } trunk/lib/jelix/forms/jFormsBuilderBase.class.php
r748 r750 313 313 case 'submit': 314 314 if($ctrl->standalone){ 315 echo '<input type="submit"',$id,$hint,' value="',htmlspecialchars($ctrl->label),'"/>';315 echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 316 316 }else{ 317 317 foreach($ctrl->datasource->getDatas() as $v=>$label){ 318 318 // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"',$hint,' value="',htmlspecialchars($label),'"/> '; 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 320 $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 320 321 } 321 322 } 322 323 break; 323 324 case 'reset': 324 echo '<button type="reset"',$id,$hint,' >',htmlspecialchars($ctrl->label),'</button>';325 echo '<button type="reset"',$id,$hint,' class="jforms-reset">',htmlspecialchars($ctrl->label),'</button>'; 325 326 break; 326 327 } trunk/lib/jelix/forms/jFormsBuilderBase.class.php
r748 r750 313 313 case 'submit': 314 314 if($ctrl->standalone){ 315 echo '<input type="submit"',$id,$hint,' value="',htmlspecialchars($ctrl->label),'"/>';315 echo '<input type="submit"',$id,$hint,' class="jforms-submit" value="',htmlspecialchars($ctrl->label),'"/>'; 316 316 }else{ 317 317 foreach($ctrl->datasource->getDatas() as $v=>$label){ 318 318 // because IE6 sucks with <button type=submit> (see ticket #431), we must use input :-( 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"',$hint,' value="',htmlspecialchars($label),'"/> '; 319 echo '<input type="submit" name="',$ctrl->ref,'" id="',$this->_name,'_',$ctrl->ref,'_',htmlspecialchars($v),'"', 320 $hint,' class="jforms-submit" value="',htmlspecialchars($label),'"/> '; 320 321 } 321 322 } 322 323 break; 323 324 case 'reset': 324 echo '<button type="reset"',$id,$hint,' >',htmlspecialchars($ctrl->label),'</button>';325 echo '<button type="reset"',$id,$hint,' class="jforms-reset">',htmlspecialchars($ctrl->label),'</button>'; 325 326 break; 326 327 } trunk/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
r717 r750 71 71 persistant_duration = 1 72 72 73 ; base path for the cookie. If empty, it uses the basePath value from the main configuration. 74 persistant_cookie_path = 75 73 76 ;=========== Parameters for drivers 74 77 trunk/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
r717 r750 71 71 persistant_duration = 1 72 72 73 ; base path for the cookie. If empty, it uses the basePath value from the main configuration. 74 persistant_cookie_path = 75 73 76 ;=========== Parameters for drivers 74 77 trunk/lib/jelix/plugins/coord/auth/auth.coord.ini.php.dist
r717 r750 71 71 persistant_duration = 1 72 72 73 ; base path for the cookie. If empty, it uses the basePath value from the main configuration. 74 persistant_cookie_path = 75 73 76 ;=========== Parameters for drivers 74 77 trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html.php
r748 r750 600 600 601 601 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" value="Votre nom"/>', $out);607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" value="Votre nom"/>', $out);602 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 603 604 $ctrl->readonly = true; 605 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 606 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" class="jforms-submit" value="Votre nom"/>', $out); 607 608 $ctrl->hint='ceci est un tooltip'; 609 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 610 $this->assertEqualOrDiff('<input type="submit" name="nom" id="'.$this->formname.'_nom" title="ceci est un tooltip" class="jforms-submit" value="Votre nom"/>', $out); 611 611 612 612 $ctrl->standalone=false; … … 615 615 616 616 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" value="Sauvegarde"/> ';618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" value="Preview"/> ';617 $output = '<input type="submit" name="nom" id="'.$this->formname.'_nom_svg" title="ceci est un tooltip" class="jforms-submit" value="Sauvegarde"/> '; 618 $output .= '<input type="submit" name="nom" id="'.$this->formname.'_nom_prev" title="ceci est un tooltip" class="jforms-submit" value="Preview"/> '; 619 619 $this->assertEqualOrDiff($output, $out); 620 620 } … … 628 628 629 629 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 630 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);631 632 $ctrl->readonly = true; 633 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 634 $this->assertEqualOrDiff('<button type="reset" name="nom" id="'.$this->formname.'_nom" >Votre nom</button>', $out);635 636 $ctrl->hint='ceci est un tooltip'; 637 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean();
