Changeset 1069 for trunk/testapp
- Timestamp:
- 08/27/08 23:57:27 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php
r1063 r1069 81 81 $this->assertEqualOrDiff('<script type="text/javascript"> 82 82 //<![CDATA[ 83 83 (function(){var c, c2; 84 85 })(); 84 86 //]]> 85 87 </script></form>', $out); … … 96 98 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 97 99 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value=""/>', $out); 98 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');99 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';100 jForms.tForm.addControl( jForms.tControl);100 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 101 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 102 jForms.tForm.addControl(c); 101 103 ', $this->builder->getJsContent()); 102 104 … … 104 106 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 105 107 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="toto"/>', $out); 106 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');107 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';108 jForms.tForm.addControl( jForms.tControl);108 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 109 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 110 jForms.tForm.addControl(c); 109 111 ', $this->builder->getJsContent()); 110 112 … … 112 114 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 113 115 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="toto"/>', $out); 114 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');115 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';116 jForms.tForm.addControl( jForms.tControl);116 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 117 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 118 jForms.tForm.addControl(c); 117 119 ', $this->builder->getJsContent()); 118 120 … … 121 123 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 122 124 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="laurent"/>', $out); 123 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');124 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';125 jForms.tForm.addControl( jForms.tControl);125 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 126 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 127 jForms.tForm.addControl(c); 126 128 ', $this->builder->getJsContent()); 127 129 … … 129 131 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 130 132 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" class=" jforms-required" value="laurent"/>', $out); 131 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');132 jForms.tControl.required = true;133 jForms.tControl.errRequired=\'La saisie de "Votre nom" est obligatoire\';134 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';135 jForms.tForm.addControl( jForms.tControl);133 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 134 c.required = true; 135 c.errRequired=\'La saisie de "Votre nom" est obligatoire\'; 136 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 137 jForms.tForm.addControl(c); 136 138 ', $this->builder->getJsContent()); 137 139 … … 141 143 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 142 144 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" readonly="readonly" class=" jforms-readonly" value="laurent"/>', $out); 143 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');144 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';145 jForms.tForm.addControl( jForms.tControl);145 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 146 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 147 jForms.tForm.addControl(c); 146 148 ', $this->builder->getJsContent()); 147 149 … … 151 153 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 152 154 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="laurent"/><span class="jforms-help"><a href="javascript:jForms.showHelp(\''. $this->formname.'\',\'input1\')">?</a></span>', $out); 153 $this->assertEqualOrDiff('jForms.tControl = new jFormsControlString(\'input1\', \'Votre nom\'); 154 jForms.tControl.help=\'some help\'; 155 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\'; 156 jForms.tForm.addControl(jForms.tControl); 157 ', $this->builder->getJsContent()); 158 155 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 156 c.help=\'some help\'; 157 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 158 jForms.tForm.addControl(c); 159 ', $this->builder->getJsContent()); 160 161 162 $ctrl->help='some 163 help with \' and 164 line break.'; 165 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 166 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="laurent"/><span class="jforms-help"><a href="javascript:jForms.showHelp(\''. $this->formname.'\',\'input1\')">?</a></span>', $out); 167 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 168 c.help=\'some \nhelp with \\\' and\nline break.\'; 169 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 170 jForms.tForm.addControl(c); 171 ', $this->builder->getJsContent()); 159 172 160 173 $ctrl->hint='ceci est un tooltip'; 174 $ctrl->help='some help'; 161 175 ob_start();$this->builder->outputControlLabel($ctrl);$out = ob_get_clean(); 162 176 $this->assertEqualOrDiff('<label class="jforms-label" for="'.$this->formname.'_input1" title="ceci est un tooltip">Votre nom</label>', $out); … … 164 178 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 165 179 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" title="ceci est un tooltip" value="laurent"/><span class="jforms-help"><a href="javascript:jForms.showHelp(\''. $this->formname.'\',\'input1\')">?</a></span>', $out); 166 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');167 jForms.tControl.help=\'some help\';168 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';169 jForms.tForm.addControl( jForms.tControl);180 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 181 c.help=\'some help\'; 182 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 183 jForms.tForm.addControl(c); 170 184 ', $this->builder->getJsContent()); 171 185 … … 176 190 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 177 191 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" maxlength="5" value="laurent"/>', $out); 178 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'input1\', \'Votre nom\');179 jForms.tControl.maxLength = \'5\';180 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';181 jForms.tForm.addControl( jForms.tControl);192 $this->assertEqualOrDiff('c = new jFormsControlString(\'input1\', \'Votre nom\'); 193 c.maxLength = \'5\'; 194 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 195 jForms.tForm.addControl(c); 182 196 ', $this->builder->getJsContent()); 183 197 … … 194 208 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 195 209 $this->assertEqualOrDiff('<input type="checkbox" name="chk1" id="'.$this->formname.'_chk1" value="1"/>', $out); 196 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk1\', \'Une option\');197 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';198 jForms.tForm.addControl( jForms.tControl);210 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk1\', \'Une option\'); 211 c.errInvalid=\'La saisie de "Une option" est invalide\'; 212 jForms.tForm.addControl(c); 199 213 ', $this->builder->getJsContent()); 200 214 … … 203 217 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 204 218 $this->assertEqualOrDiff('<input type="checkbox" name="chk1" id="'.$this->formname.'_chk1" checked="checked" value="1"/>', $out); 205 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk1\', \'Une option\');206 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';207 jForms.tForm.addControl( jForms.tControl);219 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk1\', \'Une option\'); 220 c.errInvalid=\'La saisie de "Une option" est invalide\'; 221 jForms.tForm.addControl(c); 208 222 ', $this->builder->getJsContent()); 209 223 … … 218 232 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 219 233 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" value="1"/>', $out); 220 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk2\', \'Une option\');221 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';222 jForms.tForm.addControl( jForms.tControl);234 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk2\', \'Une option\'); 235 c.errInvalid=\'La saisie de "Une option" est invalide\'; 236 jForms.tForm.addControl(c); 223 237 ', $this->builder->getJsContent()); 224 238 … … 229 243 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 230 244 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" checked="checked" value="1"/>', $out); 231 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk2\', \'Une option\');232 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';233 jForms.tForm.addControl( jForms.tControl);245 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk2\', \'Une option\'); 246 c.errInvalid=\'La saisie de "Une option" est invalide\'; 247 jForms.tForm.addControl(c); 234 248 ', $this->builder->getJsContent()); 235 249 … … 237 251 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 238 252 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" value="1"/>', $out); 239 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk2\', \'Une option\');240 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';241 jForms.tForm.addControl( jForms.tControl);253 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk2\', \'Une option\'); 254 c.errInvalid=\'La saisie de "Une option" est invalide\'; 255 jForms.tForm.addControl(c); 242 256 ', $this->builder->getJsContent()); 243 257 … … 246 260 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 247 261 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" readonly="readonly" class=" jforms-readonly" value="1"/>', $out); 248 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk2\', \'Une option\');249 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';250 jForms.tForm.addControl( jForms.tControl);262 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk2\', \'Une option\'); 263 c.errInvalid=\'La saisie de "Une option" est invalide\'; 264 jForms.tForm.addControl(c); 251 265 ', $this->builder->getJsContent()); 252 266 … … 255 269 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 256 270 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" readonly="readonly" class=" jforms-readonly" checked="checked" value="1"/>', $out); 257 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk2\', \'Une option\');258 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';259 jForms.tForm.addControl( jForms.tControl);271 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk2\', \'Une option\'); 272 c.errInvalid=\'La saisie de "Une option" est invalide\'; 273 jForms.tForm.addControl(c); 260 274 ', $this->builder->getJsContent()); 261 275 … … 266 280 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 267 281 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" checked="checked" value="1"/>', $out); 268 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlBoolean(\'chk2\', \'Une option\');269 jForms.tControl.errInvalid=\'La saisie de "Une option" est invalide\';270 jForms.tForm.addControl( jForms.tControl);282 $this->assertEqualOrDiff('c = new jFormsControlBoolean(\'chk2\', \'Une option\'); 283 c.errInvalid=\'La saisie de "Une option" est invalide\'; 284 jForms.tForm.addControl(c); 271 285 ', $this->builder->getJsContent()); 272 286 … … 295 309 $result.='<span class="jforms-chkbox jforms-ctl-choixsimple"><input type="checkbox" name="choixsimple[]" id="'.$this->formname.'_choixsimple_2" value="23"/><label for="'.$this->formname.'_choixsimple_2">baz</label></span>'; 296 310 $this->assertEqualOrDiff($result, $out); 297 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'choixsimple[]\', \'Vos choix\');298 jForms.tControl.errInvalid=\'La saisie de "Vos choix" est invalide\';299 jForms.tForm.addControl( jForms.tControl);311 $this->assertEqualOrDiff('c = new jFormsControlString(\'choixsimple[]\', \'Vos choix\'); 312 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 313 jForms.tForm.addControl(c); 300 314 ', $this->builder->getJsContent()); 301 315 … … 307 321 $result.='<span class="jforms-chkbox jforms-ctl-choixsimple"><input type="checkbox" name="choixsimple[]" id="'.$this->formname.'_choixsimple_2" value="23"/><label for="'.$this->formname.'_choixsimple_2">baz</label></span>'; 308 322 $this->assertEqualOrDiff($result, $out); 309 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'choixsimple[]\', \'Vos choix\');310 jForms.tControl.errInvalid=\'La saisie de "Vos choix" est invalide\';311 jForms.tForm.addControl( jForms.tControl);323 $this->assertEqualOrDiff('c = new jFormsControlString(\'choixsimple[]\', \'Vos choix\'); 324 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 325 jForms.tForm.addControl(c); 312 326 ', $this->builder->getJsContent()); 313 327 … … 332 346 $result.='<span class="jforms-chkbox jforms-ctl-choixmultiple"><input type="checkbox" name="choixmultiple[]" id="'.$this->formname.'_choixmultiple_2" value="23"/><label for="'.$this->formname.'_choixmultiple_2">baz</label></span>'; 333 347 $this->assertEqualOrDiff($result, $out); 334 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'choixmultiple[]\', \'Vos choix\');335 jForms.tControl.errInvalid=\'La saisie de "Vos choix" est invalide\';336 jForms.tForm.addControl( jForms.tControl);348 $this->assertEqualOrDiff('c = new jFormsControlString(\'choixmultiple[]\', \'Vos choix\'); 349 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 350 jForms.tForm.addControl(c); 337 351 ', $this->builder->getJsContent()); 338 352 … … 344 358 $result.='<span class="jforms-chkbox jforms-ctl-choixmultiple"><input type="checkbox" name="choixmultiple[]" id="'.$this->formname.'_choixmultiple_2" value="23"/><label for="'.$this->formname.'_choixmultiple_2">baz</label></span>'; 345 359 $this->assertEqualOrDiff($result, $out); 346 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'choixmultiple[]\', \'Vos choix\');347 jForms.tControl.errInvalid=\'La saisie de "Vos choix" est invalide\';348 jForms.tForm.addControl( jForms.tControl);360 $this->assertEqualOrDiff('c = new jFormsControlString(\'choixmultiple[]\', \'Vos choix\'); 361 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 362 jForms.tForm.addControl(c); 349 363 ', $this->builder->getJsContent()); 350 364 … … 356 370 $result.='<span class="jforms-chkbox jforms-ctl-choixmultiple"><input type="checkbox" name="choixmultiple[]" id="'.$this->formname.'_choixmultiple_2" value="23" checked="checked"/><label for="'.$this->formname.'_choixmultiple_2">baz</label></span>'; 357 371 $this->assertEqualOrDiff($result, $out); 358 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'choixmultiple[]\', \'Vos choix\');359 jForms.tControl.errInvalid=\'La saisie de "Vos choix" est invalide\';360 jForms.tForm.addControl( jForms.tControl);372 $this->assertEqualOrDiff('c = new jFormsControlString(\'choixmultiple[]\', \'Vos choix\'); 373 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 374 jForms.tForm.addControl(c); 361 375 ', $this->builder->getJsContent()); 362 376 … … 372 386 $result.='<span class="jforms-chkbox jforms-ctl-choixmultiple"><input type="checkbox" name="choixmultiple[]" id="'.$this->formname.'_choixmultiple_2" value="23" checked="checked" readonly="readonly" class=" jforms-readonly"/><label for="'.$this->formname.'_choixmultiple_2">baz</label></span>'; 373 387 $this->assertEqualOrDiff($result, $out); 374 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'choixmultiple[]\', \'Vos choix\');375 jForms.tControl.errInvalid=\'La saisie de "Vos choix" est invalide\';376 jForms.tForm.addControl( jForms.tControl);388 $this->assertEqualOrDiff('c = new jFormsControlString(\'choixmultiple[]\', \'Vos choix\'); 389 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 390 jForms.tForm.addControl(c); 377 391 ', $this->builder->getJsContent()); 378 392 } … … 393 407 $result.='<span class="jforms-radio jforms-ctl-rbchoixsimple"><input type="radio" name="rbchoixsimple" id="'.$this->formname.'_rbchoixsimple_2" value="23"/><label for="'.$this->formname.'_rbchoixsimple_2">baz</label></span>'; 394 408 $this->assertEqualOrDiff($result, $out); 395 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'rbchoixsimple\', \'Votre choix\');396 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';397 jForms.tForm.addControl( jForms.tControl);409 $this->assertEqualOrDiff('c = new jFormsControlString(\'rbchoixsimple\', \'Votre choix\'); 410 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 411 jForms.tForm.addControl(c); 398 412 ', $this->builder->getJsContent()); 399 413 … … 406 420 $result.='<span class="jforms-radio jforms-ctl-rbchoixsimple"><input type="radio" name="rbchoixsimple" id="'.$this->formname.'_rbchoixsimple_2" value="23"/><label for="'.$this->formname.'_rbchoixsimple_2">baz</label></span>'; 407 421 $this->assertEqualOrDiff($result, $out); 408 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'rbchoixsimple\', \'Votre choix\');409 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';410 jForms.tForm.addControl( jForms.tControl);422 $this->assertEqualOrDiff('c = new jFormsControlString(\'rbchoixsimple\', \'Votre choix\'); 423 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 424 jForms.tForm.addControl(c); 411 425 ', $this->builder->getJsContent()); 412 426 … … 424 438 $result.='<span class="jforms-radio jforms-ctl-rbchoixsimple"><input type="radio" name="rbchoixsimple" id="'.$this->formname.'_rbchoixsimple_2" value="23"/><label for="'.$this->formname.'_rbchoixsimple_2">baz</label></span>'; 425 439 $this->assertEqualOrDiff($result, $out); 426 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'rbchoixsimple\', \'Votre choix\');427 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';428 jForms.tForm.addControl( jForms.tControl);440 $this->assertEqualOrDiff('c = new jFormsControlString(\'rbchoixsimple\', \'Votre choix\'); 441 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 442 jForms.tForm.addControl(c); 429 443 ', $this->builder->getJsContent()); 430 444 … … 436 450 $result.='<span class="jforms-radio jforms-ctl-rbchoixsimple"><input type="radio" name="rbchoixsimple" id="'.$this->formname.'_rbchoixsimple_2" value="23" checked="checked"/><label for="'.$this->formname.'_rbchoixsimple_2">baz</label></span>'; 437 451 $this->assertEqualOrDiff($result, $out); 438 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'rbchoixsimple\', \'Votre choix\');439 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';440 jForms.tForm.addControl( jForms.tControl);452 $this->assertEqualOrDiff('c = new jFormsControlString(\'rbchoixsimple\', \'Votre choix\'); 453 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 454 jForms.tForm.addControl(c); 441 455 ', $this->builder->getJsContent()); 442 456 … … 451 465 $result.='<span class="jforms-radio jforms-ctl-rbchoixsimple"><input type="radio" name="rbchoixsimple" id="'.$this->formname.'_rbchoixsimple_2" value="23" checked="checked" readonly="readonly" class=" jforms-readonly"/><label for="'.$this->formname.'_rbchoixsimple_2">baz</label></span>'; 452 466 $this->assertEqualOrDiff($result, $out); 453 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'rbchoixsimple\', \'Votre choix\');454 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';455 jForms.tForm.addControl( jForms.tControl);467 $this->assertEqualOrDiff('c = new jFormsControlString(\'rbchoixsimple\', \'Votre choix\'); 468 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 469 jForms.tForm.addControl(c); 456 470 ', $this->builder->getJsContent()); 457 471 … … 476 490 $result.='</select>'; 477 491 $this->assertEqualOrDiff($result, $out); 478 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');479 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';480 jForms.tForm.addControl( jForms.tControl);492 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 493 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 494 jForms.tForm.addControl(c); 481 495 ', $this->builder->getJsContent()); 482 496 … … 491 505 $result.='</select>'; 492 506 $this->assertEqualOrDiff($result, $out); 493 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');494 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';495 jForms.tForm.addControl( jForms.tControl);507 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 508 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 509 jForms.tForm.addControl(c); 496 510 ', $this->builder->getJsContent()); 497 511 … … 506 520 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 507 521 $this->assertEqualOrDiff($result, $out); 508 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');509 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';510 jForms.tForm.addControl( jForms.tControl);522 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 523 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 524 jForms.tForm.addControl(c); 511 525 ', $this->builder->getJsContent()); 512 526 … … 524 538 $result.='</select>'; 525 539 $this->assertEqualOrDiff($result, $out); 526 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');527 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';528 jForms.tForm.addControl( jForms.tControl);540 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 541 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 542 jForms.tForm.addControl(c); 529 543 ', $this->builder->getJsContent()); 530 544 … … 539 553 $result.='</select>'; 540 554 $this->assertEqualOrDiff($result, $out); 541 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');542 jForms.tControl.required = true;543 jForms.tControl.errRequired=\'La saisie de "Votre choix" est obligatoire\';544 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';545 jForms.tForm.addControl( jForms.tControl);555 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 556 c.required = true; 557 c.errRequired=\'La saisie de "Votre choix" est obligatoire\'; 558 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 559 jForms.tForm.addControl(c); 546 560 ', $this->builder->getJsContent()); 547 561 … … 557 571 $result.='</select>'; 558 572 $this->assertEqualOrDiff($result, $out); 559 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');560 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';561 jForms.tForm.addControl( jForms.tControl);573 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 574 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 575 jForms.tForm.addControl(c); 562 576 ', $this->builder->getJsContent()); 563 577 … … 573 587 $result.='</select>'; 574 588 $this->assertEqualOrDiff($result, $out); 575 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');576 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';577 jForms.tForm.addControl( jForms.tControl);589 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 590 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 591 jForms.tForm.addControl(c); 578 592 ', $this->builder->getJsContent()); 579 593 … … 586 600 $result.='</select>'; 587 601 $this->assertEqualOrDiff($result, $out); 588 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');589 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';590 jForms.tForm.addControl( jForms.tControl);602 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 603 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 604 jForms.tForm.addControl(c); 591 605 ', $this->builder->getJsContent()); 592 606 … … 599 613 $result.='</select>'; 600 614 $this->assertEqualOrDiff($result, $out); 601 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');602 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';603 jForms.tForm.addControl( jForms.tControl);615 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 616 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 617 jForms.tForm.addControl(c); 604 618 ', $this->builder->getJsContent()); 605 619 … … 618 632 $result.='</select>'; 619 633 $this->assertEqualOrDiff($result, $out); 620 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'menulist1\', \'Votre choix\');621 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';622 jForms.tForm.addControl( jForms.tControl);634 $this->assertEqualOrDiff('c = new jFormsControlString(\'menulist1\', \'Votre choix\'); 635 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 636 jForms.tForm.addControl(c); 623 637 ', $this->builder->getJsContent()); 624 638 … … 730 744 $result.='</select>'; 731 745 $this->assertEqualOrDiff($result, $out); 732 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'listbox1\', \'Votre choix\');733 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';734 jForms.tForm.addControl( jForms.tControl);746 $this->assertEqualOrDiff('c = new jFormsControlString(\'listbox1\', \'Votre choix\'); 747 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 748 jForms.tForm.addControl(c); 735 749 ', $this->builder->getJsContent()); 736 750 … … 743 757 $result.='</select>'; 744 758 $this->assertEqualOrDiff($result, $out); 745 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'listbox1\', \'Votre choix\');746 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';747 jForms.tForm.addControl( jForms.tControl);759 $this->assertEqualOrDiff('c = new jFormsControlString(\'listbox1\', \'Votre choix\'); 760 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 761 jForms.tForm.addControl(c); 748 762 ', $this->builder->getJsContent()); 749 763 … … 758 772 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 759 773 $this->assertEqualOrDiff($result, $out); 760 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'listbox1\', \'Votre choix\');761 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';762 jForms.tForm.addControl( jForms.tControl);774 $this->assertEqualOrDiff('c = new jFormsControlString(\'listbox1\', \'Votre choix\'); 775 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 776 jForms.tForm.addControl(c); 763 777 ', $this->builder->getJsContent()); 764 778 … … 775 789 $result.='</select>'; 776 790 $this->assertEqualOrDiff($result, $out); 777 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'listbox1\', \'Votre choix\');778 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';779 jForms.tForm.addControl( jForms.tControl);791 $this->assertEqualOrDiff('c = new jFormsControlString(\'listbox1\', \'Votre choix\'); 792 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 793 jForms.tForm.addControl(c); 780 794 ', $this->builder->getJsContent()); 781 795 … … 800 814 $result.='</select>'; 801 815 $this->assertEqualOrDiff($result, $out); 802 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'lbchoixmultiple[]\', \'Votre choix\');803 jForms.tControl.multiple = true;804 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';805 jForms.tForm.addControl( jForms.tControl);816 $this->assertEqualOrDiff('c = new jFormsControlString(\'lbchoixmultiple[]\', \'Votre choix\'); 817 c.multiple = true; 818 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 819 jForms.tForm.addControl(c); 806 820 ', $this->builder->getJsContent()); 807 821 … … 815 829 $result.='</select>'; 816 830 $this->assertEqualOrDiff($result, $out); 817 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'lbchoixmultiple[]\', \'Votre choix\');818 jForms.tControl.multiple = true;819 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';820 jForms.tForm.addControl( jForms.tControl);831 $this->assertEqualOrDiff('c = new jFormsControlString(\'lbchoixmultiple[]\', \'Votre choix\'); 832 c.multiple = true; 833 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 834 jForms.tForm.addControl(c); 821 835 ', $this->builder->getJsContent()); 822 836 … … 839 853 $result.='</select>'; 840 854 $this->assertEqualOrDiff($result, $out); 841 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'listbox2\', \'Votre choix\');842 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';843 jForms.tForm.addControl( jForms.tControl);855 $this->assertEqualOrDiff('c = new jFormsControlString(\'listbox2\', \'Votre choix\'); 856 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 857 jForms.tForm.addControl(c); 844 858 ', $this->builder->getJsContent()); 845 859 … … 864 878 $result.='</select>'; 865 879 $this->assertEqualOrDiff($result, $out); 866 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'lbchoixmultiple2[]\', \'Votre choix\');867 jForms.tControl.multiple = true;868 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';869 jForms.tForm.addControl( jForms.tControl);880 $this->assertEqualOrDiff('c = new jFormsControlString(\'lbchoixmultiple2[]\', \'Votre choix\'); 881 c.multiple = true; 882 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 883 jForms.tForm.addControl(c); 870 884 ', $this->builder->getJsContent()); 871 885 … … 888 902 $result.='</select>'; 889 903 $this->assertEqualOrDiff($result, $out); 890 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'listboxclass\', \'Votre choix\');891 jForms.tControl.errInvalid=\'La saisie de "Votre choix" est invalide\';892 jForms.tForm.addControl( jForms.tControl);904 $this->assertEqualOrDiff('c = new jFormsControlString(\'listboxclass\', \'Votre choix\'); 905 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 906 jForms.tForm.addControl(c); 893 907 ', $this->builder->getJsContent()); 894 908 … … 907 921 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 908 922 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" rows="5" cols="40"></textarea>', $out); 909 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'textarea1\', \'Votre nom\');910 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';911 jForms.tForm.addControl( jForms.tControl);923 $this->assertEqualOrDiff('c = new jFormsControlString(\'textarea1\', \'Votre nom\'); 924 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 925 jForms.tForm.addControl(c); 912 926 ', $this->builder->getJsContent()); 913 927 … … 916 930 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 917 931 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" rows="5" cols="40">laurent</textarea>', $out); 918 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'textarea1\', \'Votre nom\');919 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';920 jForms.tForm.addControl( jForms.tControl);932 $this->assertEqualOrDiff('c = new jFormsControlString(\'textarea1\', \'Votre nom\'); 933 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 934 jForms.tForm.addControl(c); 921 935 ', $this->builder->getJsContent()); 922 936 … … 925 939 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 926 940 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" readonly="readonly" class=" jforms-readonly" rows="5" cols="40">laurent</textarea>', $out); 927 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'textarea1\', \'Votre nom\');928 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';929 jForms.tForm.addControl( jForms.tControl);941 $this->assertEqualOrDiff('c = new jFormsControlString(\'textarea1\', \'Votre nom\'); 942 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 943 jForms.tForm.addControl(c); 930 944 ', $this->builder->getJsContent()); 931 945 … … 937 951 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 938 952 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" rows="5" cols="40">laurent</textarea>', $out); 939 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'textarea1\', \'Votre nom\');940 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';941 jForms.tForm.addControl( jForms.tControl);953 $this->assertEqualOrDiff('c = new jFormsControlString(\'textarea1\', \'Votre nom\'); 954 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 955 jForms.tForm.addControl(c); 942 956 ', $this->builder->getJsContent()); 943 957 … … 946 960 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 947 961 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" rows="20" cols="40">laurent</textarea>', $out); 948 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'textarea1\', \'Votre nom\');949 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';950 jForms.tForm.addControl( jForms.tControl);962 $this->assertEqualOrDiff('c = new jFormsControlString(\'textarea1\', \'Votre nom\'); 963 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 964 jForms.tForm.addControl(c); 951 965 ', $this->builder->getJsContent()); 952 966 … … 955 969 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 956 970 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" rows="20" cols="60">laurent</textarea>', $out); 957 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'textarea1\', \'Votre nom\');958 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';959 jForms.tForm.addControl( jForms.tControl);971 $this->assertEqualOrDiff('c = new jFormsControlString(\'textarea1\', \'Votre nom\'); 972 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 973 jForms.tForm.addControl(c); 960 974 ', $this->builder->getJsContent()); 961 975 … … 973 987 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 974 988 $this->assertEqualOrDiff('<input type="password" name="passwd" id="'.$this->formname.'_passwd" value=""/>', $out); 975 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'passwd\', \'mot de passe\');976 jForms.tControl.errInvalid=\'La saisie de "mot de passe" est invalide\';977 jForms.tForm.addControl( jForms.tControl);989 $this->assertEqualOrDiff('c = new jFormsControlString(\'passwd\', \'mot de passe\'); 990 c.errInvalid=\'La saisie de "mot de passe" est invalide\'; 991 jForms.tForm.addControl(c); 978 992 ', $this->builder->getJsContent()); 979 993 … … 981 995 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 982 996 $this->assertEqualOrDiff('<input type="password" name="passwd" id="'.$this->formname.'_passwd" value="laurent"/>', $out); 983 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'passwd\', \'mot de passe\');984 jForms.tControl.errInvalid=\'La saisie de "mot de passe" est invalide\';985 jForms.tForm.addControl( jForms.tControl);997 $this->assertEqualOrDiff('c = new jFormsControlString(\'passwd\', \'mot de passe\'); 998 c.errInvalid=\'La saisie de "mot de passe" est invalide\'; 999 jForms.tForm.addControl(c); 986 1000 ', $this->builder->getJsContent()); 987 1001 … … 989 1003 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 990 1004 $this->assertEqualOrDiff('<input type="password" name="passwd" id="'.$this->formname.'_passwd" readonly="readonly" class=" jforms-readonly" value="laurent"/>', $out); 991 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'passwd\', \'mot de passe\');992 jForms.tControl.errInvalid=\'La saisie de "mot de passe" est invalide\';993 jForms.tForm.addControl( jForms.tControl);1005 $this->assertEqualOrDiff('c = new jFormsControlString(\'passwd\', \'mot de passe\'); 1006 c.errInvalid=\'La saisie de "mot de passe" est invalide\'; 1007 jForms.tForm.addControl(c); 994 1008 ', $this->builder->getJsContent()); 995 1009 … … 999 1013 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1000 1014 $this->assertEqualOrDiff('<input type="password" name="passwd" id="'.$this->formname.'_passwd" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" value="laurent"/>', $out); 1001 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'passwd\', \'mot de passe\');1002 jForms.tControl.errInvalid=\'La saisie de "mot de passe" est invalide\';1003 jForms.tForm.addControl( jForms.tControl);1015 $this->assertEqualOrDiff('c = new jFormsControlString(\'passwd\', \'mot de passe\'); 1016 c.errInvalid=\'La saisie de "mot de passe" est invalide\'; 1017 jForms.tForm.addControl(c); 1004 1018 ', $this->builder->getJsContent()); 1005 1019 … … 1008 1022 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1009 1023 $this->assertEqualOrDiff('<input type="password" name="passwd" id="'.$this->formname.'_passwd" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" maxlength="10" value="laurent"/>', $out); 1010 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'passwd\', \'mot de passe\');1011 jForms.tControl.maxLength = \'10\';1012 jForms.tControl.minLength = \'5\';1013 jForms.tControl.errInvalid=\'La saisie de "mot de passe" est invalide\';1014 jForms.tForm.addControl( jForms.tControl);1024 $this->assertEqualOrDiff('c = new jFormsControlString(\'passwd\', \'mot de passe\'); 1025 c.maxLength = \'10\'; 1026 c.minLength = \'5\'; 1027 c.errInvalid=\'La saisie de "mot de passe" est invalide\'; 1028 jForms.tForm.addControl(c); 1015 1029 ', $this->builder->getJsContent()); 1016 1030 … … 1027 1041 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1028 1042 $this->assertEqualOrDiff('<input type="password" name="passwd_confirm" id="'.$this->formname.'_passwd_confirm" value=""/>', $out); 1029 $this->assertEqualOrDiff(' jForms.tControl.confirmField = new jFormsControlSecretConfirm(\'passwd_confirm_confirm\', \'confirmation mot de passe\');1043 $this->assertEqualOrDiff('c.confirmField = new jFormsControlSecretConfirm(\'passwd_confirm_confirm\', \'confirmation mot de passe\'); 1030 1044 ', $this->builder->getJsContent()); 1031 1045 … … 1034 1048 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1035 1049 $this->assertEqualOrDiff('<input type="password" name="passwd_confirm" id="'.$this->formname.'_passwd_confirm" readonly="readonly" class=" jforms-readonly" value=""/>', $out); 1036 $this->assertEqualOrDiff(' jForms.tControl.confirmField = new jFormsControlSecretConfirm(\'passwd_confirm_confirm\', \'confirmation mot de passe\');1050 $this->assertEqualOrDiff('c.confirmField = new jFormsControlSecretConfirm(\'passwd_confirm_confirm\', \'confirmation mot de passe\'); 1037 1051 ', $this->builder->getJsContent()); 1038 1052 … … 1043 1057 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1044 1058 $this->assertEqualOrDiff('<input type="password" name="passwd_confirm" id="'.$this->formname.'_passwd_confirm" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" value=""/>', $out); 1045 $this->assertEqualOrDiff(' jForms.tControl.confirmField = new jFormsControlSecretConfirm(\'passwd_confirm_confirm\', \'confirmation mot de passe\');1059 $this->assertEqualOrDiff('c.confirmField = new jFormsControlSecretConfirm(\'passwd_confirm_confirm\', \'confirmation mot de passe\'); 1046 1060 ', $this->builder->getJsContent()); 1047 1061 … … 1095 1109 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1096 1110 $this->assertEqualOrDiff('<input type="file" name="upload1" id="'.$this->formname.'_upload1" value=""/>', $out); 1097 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'upload1\', \'Votre nom\');1098 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';1099 jForms.tForm.addControl( jForms.tControl);1111 $this->assertEqualOrDiff('c = new jFormsControlString(\'upload1\', \'Votre nom\'); 1112 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 1113 jForms.tForm.addControl(c); 1100 1114 ', $this->builder->getJsContent()); 1101 1115 … … 1103 1117 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1104 1118 $this->assertEqualOrDiff('<input type="file" name="upload1" id="'.$this->formname.'_upload1" readonly="readonly" class=" jforms-readonly" value=""/>', $out); 1105 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'upload1\', \'Votre nom\');1106 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';1107 jForms.tForm.addControl( jForms.tControl);1119 $this->assertEqualOrDiff('c = new jFormsControlString(\'upload1\', \'Votre nom\'); 1120 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 1121 jForms.tForm.addControl(c); 1108 1122 ', $this->builder->getJsContent()); 1109 1123 … … 1114 1128 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1115 1129 $this->assertEqualOrDiff('<input type="file" name="upload1" id="'.$this->formname.'_upload1" readonly="readonly" title="ceci est un tooltip" class=" jforms-readonly" value=""/>', $out); 1116 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'upload1\', \'Votre nom\');1117 jForms.tControl.errInvalid=\'La saisie de "Votre nom" est invalide\';1118 jForms.tForm.addControl( jForms.tControl);1130 $this->assertEqualOrDiff('c = new jFormsControlString(\'upload1\', \'Votre nom\'); 1131 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 1132 jForms.tForm.addControl(c); 1119 1133 ', $this->builder->getJsContent()); 1120 1134 … … 1262 1276 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1263 1277 $this->assertEqualOrDiff('<span class="jforms-captcha-question">'.htmlspecialchars($ctrl->question).'</span> <input type="text" name="cap" id="'.$this->formname.'_cap" class=" jforms-required" value=""/>', $out); 1264 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'cap\', \'captcha for security\');1265 jForms.tControl.required = true;1266 jForms.tControl.errRequired=\'La saisie de "captcha for security" est obligatoire\';1267 jForms.tControl.errInvalid=\'La saisie de "captcha for security" est invalide\';1268 jForms.tForm.addControl( jForms.tControl);1278 $this->assertEqualOrDiff('c = new jFormsControlString(\'cap\', \'captcha for security\'); 1279 c.required = true; 1280 c.errRequired=\'La saisie de "captcha for security" est obligatoire\'; 1281 c.errInvalid=\'La saisie de "captcha for security" est invalide\'; 1282 jForms.tForm.addControl(c); 1269 1283 ', $this->builder->getJsContent()); 1270 1284 … … 1272 1286 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1273 1287 $this->assertEqualOrDiff('<span class="jforms-captcha-question">'.htmlspecialchars($ctrl->question).'</span> <input type="text" name="cap" id="'.$this->formname.'_cap" class=" jforms-required" value=""/>', $out); 1274 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'cap\', \'captcha for security\');1275 jForms.tControl.required = true;1276 jForms.tControl.errRequired=\'La saisie de "captcha for security" est obligatoire\';1277 jForms.tControl.errInvalid=\'La saisie de "captcha for security" est invalide\';1278 jForms.tForm.addControl( jForms.tControl);1288 $this->assertEqualOrDiff('c = new jFormsControlString(\'cap\', \'captcha for security\'); 1289 c.required = true; 1290 c.errRequired=\'La saisie de "captcha for security" est obligatoire\'; 1291 c.errInvalid=\'La saisie de "captcha for security" est invalide\'; 1292 jForms.tForm.addControl(c); 1279 1293 ', $this->builder->getJsContent()); 1280 1294 … … 1282 1296 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1283 1297 $this->assertEqualOrDiff('<span class="jforms-captcha-question">'.htmlspecialchars($ctrl->question).'</span> <input type="text" name="cap" id="'.$this->formname.'_cap" value=""/>', $out); 1284 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'cap\', \'captcha for security\');1285 jForms.tControl.required = true;1286 jForms.tControl.errRequired=\'La saisie de "captcha for security" est obligatoire\';1287 jForms.tControl.errInvalid=\'La saisie de "captcha for security" est invalide\';1288 jForms.tForm.addControl( jForms.tControl);1298 $this->assertEqualOrDiff('c = new jFormsControlString(\'cap\', \'captcha for security\'); 1299 c.required = true; 1300 c.errRequired=\'La saisie de "captcha for security" est obligatoire\'; 1301 c.errInvalid=\'La saisie de "captcha for security" est invalide\'; 1302 jForms.tForm.addControl(c); 1289 1303 ', $this->builder->getJsContent()); 1290 1304 … … 1293 1307 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1294 1308 $this->assertEqualOrDiff('<span class="jforms-captcha-question">'.htmlspecialchars($ctrl->question).'</span> <input type="text" name="cap" id="'.$this->formname.'_cap" class=" jforms-required" value=""/><span class="jforms-help"><a href="javascript:jForms.showHelp(\''. $this->formname.'\',\'cap\')">?</a></span>', $out); 1295 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'cap\', \'captcha for security\');1296 jForms.tControl.help=\'some help\';1297 jForms.tControl.required = true;1298 jForms.tControl.errRequired=\'La saisie de "captcha for security" est obligatoire\';1299 jForms.tControl.errInvalid=\'La saisie de "captcha for security" est invalide\';1300 jForms.tForm.addControl( jForms.tControl);1309 $this->assertEqualOrDiff('c = new jFormsControlString(\'cap\', \'captcha for security\'); 1310 c.help=\'some help\'; 1311 c.required = true; 1312 c.errRequired=\'La saisie de "captcha for security" est obligatoire\'; 1313 c.errInvalid=\'La saisie de "captcha for security" est invalide\'; 1314 jForms.tForm.addControl(c); 1301 1315 ', $this->builder->getJsContent()); 1302 1316 … … 1307 1321 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 1308 1322 $this->assertEqualOrDiff('<span class="jforms-captcha-question">'.htmlspecialchars($ctrl->question).'</span> <input type="text" name="cap" id="'.$this->formname.'_cap" title="ceci est un tooltip" class=" jforms-required" value=""/><span class="jforms-help"><a href="javascript:jForms.showHelp(\''. $this->formname.'\',\'cap\')">?</a></span>', $out); 1309 $this->assertEqualOrDiff(' jForms.tControl= new jFormsControlString(\'cap\', \'captcha for security\');1310 jForms.tControl.help=\'some help\';1311 jForms.tControl.required = true;1312 jForms.tControl.errRequired=\'La saisie de "captcha for security" est obligatoire\';1313 jForms.tControl.errInvalid=\'La saisie de "captcha for security" est invalide\';1314 jForms.tForm.addControl( jForms.tControl);1323 $this->assertEqualOrDiff('c = new jFormsControlString(\'cap\', \'captcha for security\'); <
