Changeset 1081
- Timestamp:
- 09/11/08 12:06:26 (4 months ago)
- Files:
-
- trunk/build/manifests/jelix-lib.mn (modified) (2 diffs)
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/build/manifests/testapp.mn (modified) (1 diff)
- trunk/lib/jelix-www/js/jforms_jquery.js (added)
- trunk/lib/jelix-www/js/jforms_light.js (moved) (moved from trunk/lib/jelix-www/js/jforms.js)
- trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php (modified) (16 diffs)
- trunk/lib/jelix/plugins/jforms/htmllight (added)
- trunk/lib/jelix/plugins/jforms/htmllight/htmllight.jformsbuilder.php (added)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php (modified) (81 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder2.html_cli.php (modified) (6 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmllightbuilder.html_cli.php (added)
- trunk/testapp/modules/jelix_tests/tests/jforms.htmllightbuilder2.html_cli.php (added)
- trunk/testapp/modules/testapp/controllers/sampleform.classic.php (modified) (1 diff)
- trunk/testapp/modules/testapp/templates/sampleform.tpl (modified) (2 diffs)
- trunk/testapp/modules/testapp/templates/sampleformfull.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/jelix-lib.mn
r1079 r1081 393 393 html.jformsbuilder.php 394 394 395 cd lib/jelix/plugins/jforms/htmllight 396 htmllight.jformsbuilder.php 397 395 398 cd lib/jelix/plugins/tpl/common 396 399 block.ifacl.php … … 503 506 cd lib/jelix-www/js 504 507 tooltip.js 505 jforms.js 508 jforms_light.js 509 jforms_jquery.js 506 510 json.js 507 511 cd lib/jelix-www/xul trunk/build/manifests/jelix-no-opt.mn
r1079 r1081 1 cd lib/jelix/acl 2 jIAcl2Driver.iface.php 3 4 cd lib/jelix/auth 5 jIAuthDriver.iface.php 1 6 2 7 cd lib/jelix/core trunk/build/manifests/testapp.mn
r1039 r1081 174 174 jforms.htmlbuilder.html_cli.php 175 175 jforms.htmlbuilder2.html_cli.php 176 jforms.htmllightbuilder.html_cli.php 177 jforms.htmllightbuilder2.html_cli.php 176 178 jforms.with_dao.html_cli.php 177 179 jtpl.compiler.html_cli.php trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php
r1078 r1081 62 62 $www =$gJConfig->urlengine['jelixWWWPath']; 63 63 $bp =$gJConfig->urlengine['basePath']; 64 $resp->addJSLink($www.'js/jforms.js'); 64 $resp->addJSLink($www.'jquery/jquery.js'); 65 $resp->addJSLink($www.'js/jforms_jquery.js'); 65 66 $resp->addCSSLink($www.'design/jform.css'); 66 67 foreach($t->_vars as $k=>$v){ … … 93 94 */ 94 95 public function outputHeader($params){ 95 $this->options = array_merge(array('errorDecorator'=>'jForms ErrorDecoratorAlert',96 'helpDecorator'=>'jForms HelpDecoratorAlert', 'method'=>'post'), $params);96 $this->options = array_merge(array('errorDecorator'=>'jFormsJQErrorDecoratorAlert', 97 'helpDecorator'=>'jFormsJQHelpDecoratorAlert', 'method'=>'post'), $params); 97 98 98 99 $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant … … 105 106 echo '<script type="text/javascript"> 106 107 //<![CDATA[ 107 jForms .tForm = new jFormsForm(\''.$this->_name.'\');108 jForms .tForm.setErrorDecorator(new '.$this->options['errorDecorator'].'());109 jForms .tForm.setHelpDecorator(new '.$this->options['helpDecorator'].'());110 jForms .declareForm(jForms.tForm);108 jFormsJQ.tForm = new jFormsJQForm(\''.$this->_name.'\'); 109 jFormsJQ.tForm.setErrorDecorator(new '.$this->options['errorDecorator'].'()); 110 jFormsJQ.tForm.setHelpDecorator(new '.$this->options['helpDecorator'].'()); 111 jFormsJQ.declareForm(jFormsJQ.tForm); 111 112 //]]> 112 113 </script>'; … … 220 221 } 221 222 222 if ($this->isRootControl) $this->jsContent .="jForms .tForm.addControl(c);\n";223 if ($this->isRootControl) $this->jsContent .="jFormsJQ.tForm.addControl(c);\n"; 223 224 } 224 225 … … 252 253 $dt = 'String'; 253 254 254 $this->jsContent .="c = new jForms Control".$dt."('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";255 $this->jsContent .="c = new jFormsJQControl".$dt."('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 255 256 if ($isLocale) 256 257 $this->jsContent .="c.lang='".$GLOBALS['gJConfig']->locale."';\n"; … … 280 281 protected function jsCheckbox($ctrl) { 281 282 282 $this->jsContent .="c = new jForms ControlBoolean('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";283 $this->jsContent .="c = new jFormsJQControlBoolean('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 283 284 284 285 $this->commonJs($ctrl); … … 316 317 protected function jsCheckboxes($ctrl) { 317 318 318 $this->jsContent .="c = new jForms ControlString('".$ctrl->ref."[]', ".$this->escJsStr($ctrl->label).");\n";319 $this->jsContent .="c = new jFormsJQControlString('".$ctrl->ref."[]', ".$this->escJsStr($ctrl->label).");\n"; 319 320 320 321 $this->commonJs($ctrl); … … 341 342 protected function jsRadiobuttons($ctrl) { 342 343 343 $this->jsContent .="c = new jForms ControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";344 $this->jsContent .="c = new jFormsJQControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 344 345 345 346 $this->commonJs($ctrl); … … 366 367 protected function jsMenulist($ctrl) { 367 368 368 $this->jsContent .="c = new jForms ControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";369 $this->jsContent .="c = new jFormsJQControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 369 370 370 371 $this->commonJs($ctrl); … … 409 410 protected function jsListbox($ctrl) { 410 411 if($ctrl->multiple){ 411 $this->jsContent .= "c = new jForms ControlString('".$ctrl->ref."[]', ".$this->escJsStr($ctrl->label).");\n";412 $this->jsContent .= "c = new jFormsJQControlString('".$ctrl->ref."[]', ".$this->escJsStr($ctrl->label).");\n"; 412 413 $this->jsContent .= "c.multiple = true;\n"; 413 414 } else { 414 $this->jsContent .="c = new jForms ControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";415 $this->jsContent .="c = new jFormsJQControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 415 416 } 416 417 … … 425 426 426 427 protected function jsTextarea($ctrl) { 427 $this->jsContent .="c = new jForms ControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";428 $this->jsContent .="c = new jFormsJQControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 428 429 429 430 $maxl= $ctrl->datatype->getFacet('maxLength'); … … 471 472 protected function jsSecretconfirm($ctrl) { 472 473 // we assume that a secret confirm control is just after a secret control in the list of controls 473 $this->jsContent .= "c.confirmField = new jForms ControlSecretConfirm('".$ctrl->ref."_confirm', ".$this->escJsStr($ctrl->label).");\n";474 $this->jsContent .= "c.confirmField = new jFormsJQControlSecretConfirm('".$ctrl->ref."_confirm', ".$this->escJsStr($ctrl->label).");\n"; 474 475 } 475 476 … … 492 493 493 494 protected function jsUpload($ctrl) { 494 $this->jsContent .="c = new jForms ControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";495 $this->jsContent .="c = new jFormsJQControlString('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 495 496 496 497 $this->commonJs($ctrl); … … 569 570 echo '<li><label><input type="radio"',$id,$i,'" value="',htmlspecialchars($itemName),'"'; 570 571 echo ($itemName==$value?' checked="checked"':''),$readonly; 571 echo ' onclick="jForms .getForm(\'',$this->_name,'\').getControl(\'',$ctrl->ref,'\').activate(\'',$itemName,'\')"', $this->_endt;572 echo ' onclick="jFormsJQ.getForm(\'',$this->_name,'\').getControl(\'',$ctrl->ref,'\').activate(\'',$itemName,'\')"', $this->_endt; 572 573 echo htmlspecialchars($ctrl->itemsNames[$itemName]),'</label> '; 573 574 … … 612 613 protected function jsChoiceInternal($ctrl) { 613 614 614 $this->jsContent .="c = new jForms ControlChoice('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n";615 $this->jsContent .="c = new jFormsJQControlChoice('".$ctrl->ref."', ".$this->escJsStr($ctrl->label).");\n"; 615 616 616 617 $this->commonJs($ctrl); … … 624 625 $name=$ctrl->ref; 625 626 } 626 echo '<span class="jforms-help"><a href="javascript:jForms .showHelp(\''. $this->_name.'\',\''.$name.'\')">?</a></span>';627 echo '<span class="jforms-help"><a href="javascript:jFormsJQ.showHelp(\''. $this->_name.'\',\''.$name.'\')">?</a></span>'; 627 628 } 628 629 } trunk/testapp/modules/jelix_tests/tests/jforms.htmlbuilder.html_cli.php
r1069 r1081 44 44 $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="post" id="'.$this->builder->getName().'"><script type="text/javascript"> 45 45 //<![CDATA[ 46 jForms .tForm = new jFormsForm(\'jforms_formtest\');47 jForms .tForm.setErrorDecorator(new jFormsErrorDecoratorAlert());48 jForms .tForm.setHelpDecorator(new jFormsHelpDecoratorAlert());49 jForms .declareForm(jForms.tForm);46 jFormsJQ.tForm = new jFormsJQForm(\'jforms_formtest\'); 47 jFormsJQ.tForm.setErrorDecorator(new jFormsJQErrorDecoratorAlert()); 48 jFormsJQ.tForm.setHelpDecorator(new jFormsJQHelpDecoratorAlert()); 49 jFormsJQ.declareForm(jFormsJQ.tForm); 50 50 //]]> 51 51 </script><div class="jforms-hiddens"><input type="hidden" name="module" value="jelix_tests"/> … … 61 61 $result ='<form action="'.$GLOBALS['gJConfig']->urlengine['basePath'].'index.php" method="get" id="'.$this->builder->getName().'"><script type="text/javascript"> 62 62 //<![CDATA[ 63 jForms .tForm = new jFormsForm(\'jforms_formtest1\');64 jForms .tForm.setErrorDecorator(new jFormsErrorDecoratorAlert());65 jForms .tForm.setHelpDecorator(new jFormsHelpDecoratorAlert());66 jForms .declareForm(jForms.tForm);63 jFormsJQ.tForm = new jFormsJQForm(\'jforms_formtest1\'); 64 jFormsJQ.tForm.setErrorDecorator(new jFormsJQErrorDecoratorAlert()); 65 jFormsJQ.tForm.setHelpDecorator(new jFormsJQHelpDecoratorAlert()); 66 jFormsJQ.declareForm(jFormsJQ.tForm); 67 67 //]]> 68 68 </script><div class="jforms-hiddens"><input type="hidden" name="foo" value="b>ar"/> … … 98 98 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 99 99 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value=""/>', $out); 100 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');101 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 102 jForms .tForm.addControl(c);100 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 101 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 102 jFormsJQ.tForm.addControl(c); 103 103 ', $this->builder->getJsContent()); 104 104 … … 106 106 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 107 107 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="toto"/>', $out); 108 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');109 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 110 jForms .tForm.addControl(c);108 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 109 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 110 jFormsJQ.tForm.addControl(c); 111 111 ', $this->builder->getJsContent()); 112 112 … … 114 114 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 115 115 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="toto"/>', $out); 116 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');117 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 118 jForms .tForm.addControl(c);116 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 117 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 118 jFormsJQ.tForm.addControl(c); 119 119 ', $this->builder->getJsContent()); 120 120 … … 123 123 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 124 124 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="laurent"/>', $out); 125 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');126 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 127 jForms .tForm.addControl(c);125 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 126 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 127 jFormsJQ.tForm.addControl(c); 128 128 ', $this->builder->getJsContent()); 129 129 … … 131 131 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 132 132 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" class=" jforms-required" value="laurent"/>', $out); 133 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');133 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 134 134 c.required = true; 135 135 c.errRequired=\'La saisie de "Votre nom" est obligatoire\'; 136 136 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 137 jForms .tForm.addControl(c);137 jFormsJQ.tForm.addControl(c); 138 138 ', $this->builder->getJsContent()); 139 139 … … 143 143 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 144 144 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" readonly="readonly" class=" jforms-readonly" value="laurent"/>', $out); 145 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');146 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 147 jForms .tForm.addControl(c);145 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 146 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 147 jFormsJQ.tForm.addControl(c); 148 148 ', $this->builder->getJsContent()); 149 149 … … 152 152 $ctrl->help='some help'; 153 153 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 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);155 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');154 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="laurent"/><span class="jforms-help"><a href="javascript:jFormsJQ.showHelp(\''. $this->formname.'\',\'input1\')">?</a></span>', $out); 155 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 156 156 c.help=\'some help\'; 157 157 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 158 jForms .tForm.addControl(c);158 jFormsJQ.tForm.addControl(c); 159 159 ', $this->builder->getJsContent()); 160 160 … … 164 164 line break.'; 165 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 jForms ControlString(\'input1\', \'Votre nom\');166 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" value="laurent"/><span class="jforms-help"><a href="javascript:jFormsJQ.showHelp(\''. $this->formname.'\',\'input1\')">?</a></span>', $out); 167 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 168 168 c.help=\'some \nhelp with \\\' and\nline break.\'; 169 169 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 170 jForms .tForm.addControl(c);170 jFormsJQ.tForm.addControl(c); 171 171 ', $this->builder->getJsContent()); 172 172 … … 177 177 178 178 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 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);180 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');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:jFormsJQ.showHelp(\''. $this->formname.'\',\'input1\')">?</a></span>', $out); 180 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 181 181 c.help=\'some help\'; 182 182 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 183 jForms .tForm.addControl(c);183 jFormsJQ.tForm.addControl(c); 184 184 ', $this->builder->getJsContent()); 185 185 … … 190 190 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 191 191 $this->assertEqualOrDiff('<input type="text" name="input1" id="'.$this->formname.'_input1" maxlength="5" value="laurent"/>', $out); 192 $this->assertEqualOrDiff('c = new jForms ControlString(\'input1\', \'Votre nom\');192 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'input1\', \'Votre nom\'); 193 193 c.maxLength = \'5\'; 194 194 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 195 jForms .tForm.addControl(c);195 jFormsJQ.tForm.addControl(c); 196 196 ', $this->builder->getJsContent()); 197 197 … … 208 208 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 209 209 $this->assertEqualOrDiff('<input type="checkbox" name="chk1" id="'.$this->formname.'_chk1" value="1"/>', $out); 210 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk1\', \'Une option\');210 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk1\', \'Une option\'); 211 211 c.errInvalid=\'La saisie de "Une option" est invalide\'; 212 jForms .tForm.addControl(c);212 jFormsJQ.tForm.addControl(c); 213 213 ', $this->builder->getJsContent()); 214 214 … … 217 217 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 218 218 $this->assertEqualOrDiff('<input type="checkbox" name="chk1" id="'.$this->formname.'_chk1" checked="checked" value="1"/>', $out); 219 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk1\', \'Une option\');219 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk1\', \'Une option\'); 220 220 c.errInvalid=\'La saisie de "Une option" est invalide\'; 221 jForms .tForm.addControl(c);221 jFormsJQ.tForm.addControl(c); 222 222 ', $this->builder->getJsContent()); 223 223 … … 232 232 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 233 233 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" value="1"/>', $out); 234 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk2\', \'Une option\');234 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk2\', \'Une option\'); 235 235 c.errInvalid=\'La saisie de "Une option" est invalide\'; 236 jForms .tForm.addControl(c);236 jFormsJQ.tForm.addControl(c); 237 237 ', $this->builder->getJsContent()); 238 238 … … 243 243 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 244 244 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" checked="checked" value="1"/>', $out); 245 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk2\', \'Une option\');245 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk2\', \'Une option\'); 246 246 c.errInvalid=\'La saisie de "Une option" est invalide\'; 247 jForms .tForm.addControl(c);247 jFormsJQ.tForm.addControl(c); 248 248 ', $this->builder->getJsContent()); 249 249 … … 251 251 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 252 252 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" value="1"/>', $out); 253 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk2\', \'Une option\');253 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk2\', \'Une option\'); 254 254 c.errInvalid=\'La saisie de "Une option" est invalide\'; 255 jForms .tForm.addControl(c);255 jFormsJQ.tForm.addControl(c); 256 256 ', $this->builder->getJsContent()); 257 257 … … 260 260 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 261 261 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" readonly="readonly" class=" jforms-readonly" value="1"/>', $out); 262 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk2\', \'Une option\');262 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk2\', \'Une option\'); 263 263 c.errInvalid=\'La saisie de "Une option" est invalide\'; 264 jForms .tForm.addControl(c);264 jFormsJQ.tForm.addControl(c); 265 265 ', $this->builder->getJsContent()); 266 266 … … 269 269 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 270 270 $this->assertEqualOrDiff('<input type="checkbox" name="chk2" id="'.$this->formname.'_chk2" readonly="readonly" class=" jforms-readonly" checked="checked" value="1"/>', $out); 271 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk2\', \'Une option\');271 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk2\', \'Une option\'); 272 272 c.errInvalid=\'La saisie de "Une option" est invalide\'; 273 jForms .tForm.addControl(c);273 jFormsJQ.tForm.addControl(c); 274 274 ', $this->builder->getJsContent()); 275 275 … … 280 280 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 281 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); 282 $this->assertEqualOrDiff('c = new jForms ControlBoolean(\'chk2\', \'Une option\');282 $this->assertEqualOrDiff('c = new jFormsJQControlBoolean(\'chk2\', \'Une option\'); 283 283 c.errInvalid=\'La saisie de "Une option" est invalide\'; 284 jForms .tForm.addControl(c);284 jFormsJQ.tForm.addControl(c); 285 285 ', $this->builder->getJsContent()); 286 286 … … 309 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>'; 310 310 $this->assertEqualOrDiff($result, $out); 311 $this->assertEqualOrDiff('c = new jForms ControlString(\'choixsimple[]\', \'Vos choix\');311 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'choixsimple[]\', \'Vos choix\'); 312 312 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 313 jForms .tForm.addControl(c);313 jFormsJQ.tForm.addControl(c); 314 314 ', $this->builder->getJsContent()); 315 315 … … 321 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>'; 322 322 $this->assertEqualOrDiff($result, $out); 323 $this->assertEqualOrDiff('c = new jForms ControlString(\'choixsimple[]\', \'Vos choix\');323 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'choixsimple[]\', \'Vos choix\'); 324 324 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 325 jForms .tForm.addControl(c);325 jFormsJQ.tForm.addControl(c); 326 326 ', $this->builder->getJsContent()); 327 327 … … 346 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>'; 347 347 $this->assertEqualOrDiff($result, $out); 348 $this->assertEqualOrDiff('c = new jForms ControlString(\'choixmultiple[]\', \'Vos choix\');348 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'choixmultiple[]\', \'Vos choix\'); 349 349 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 350 jForms .tForm.addControl(c);350 jFormsJQ.tForm.addControl(c); 351 351 ', $this->builder->getJsContent()); 352 352 … … 358 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>'; 359 359 $this->assertEqualOrDiff($result, $out); 360 $this->assertEqualOrDiff('c = new jForms ControlString(\'choixmultiple[]\', \'Vos choix\');360 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'choixmultiple[]\', \'Vos choix\'); 361 361 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 362 jForms .tForm.addControl(c);362 jFormsJQ.tForm.addControl(c); 363 363 ', $this->builder->getJsContent()); 364 364 … … 370 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>'; 371 371 $this->assertEqualOrDiff($result, $out); 372 $this->assertEqualOrDiff('c = new jForms ControlString(\'choixmultiple[]\', \'Vos choix\');372 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'choixmultiple[]\', \'Vos choix\'); 373 373 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 374 jForms .tForm.addControl(c);374 jFormsJQ.tForm.addControl(c); 375 375 ', $this->builder->getJsContent()); 376 376 … … 386 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>'; 387 387 $this->assertEqualOrDiff($result, $out); 388 $this->assertEqualOrDiff('c = new jForms ControlString(\'choixmultiple[]\', \'Vos choix\');388 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'choixmultiple[]\', \'Vos choix\'); 389 389 c.errInvalid=\'La saisie de "Vos choix" est invalide\'; 390 jForms .tForm.addControl(c);390 jFormsJQ.tForm.addControl(c); 391 391 ', $this->builder->getJsContent()); 392 392 } … … 407 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>'; 408 408 $this->assertEqualOrDiff($result, $out); 409 $this->assertEqualOrDiff('c = new jForms ControlString(\'rbchoixsimple\', \'Votre choix\');410 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 411 jForms .tForm.addControl(c);409 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'rbchoixsimple\', \'Votre choix\'); 410 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 411 jFormsJQ.tForm.addControl(c); 412 412 ', $this->builder->getJsContent()); 413 413 … … 420 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>'; 421 421 $this->assertEqualOrDiff($result, $out); 422 $this->assertEqualOrDiff('c = new jForms ControlString(\'rbchoixsimple\', \'Votre choix\');423 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 424 jForms .tForm.addControl(c);422 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'rbchoixsimple\', \'Votre choix\'); 423 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 424 jFormsJQ.tForm.addControl(c); 425 425 ', $this->builder->getJsContent()); 426 426 … … 438 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>'; 439 439 $this->assertEqualOrDiff($result, $out); 440 $this->assertEqualOrDiff('c = new jForms ControlString(\'rbchoixsimple\', \'Votre choix\');441 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 442 jForms .tForm.addControl(c);440 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'rbchoixsimple\', \'Votre choix\'); 441 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 442 jFormsJQ.tForm.addControl(c); 443 443 ', $this->builder->getJsContent()); 444 444 … … 450 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>'; 451 451 $this->assertEqualOrDiff($result, $out); 452 $this->assertEqualOrDiff('c = new jForms ControlString(\'rbchoixsimple\', \'Votre choix\');453 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 454 jForms .tForm.addControl(c);452 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'rbchoixsimple\', \'Votre choix\'); 453 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 454 jFormsJQ.tForm.addControl(c); 455 455 ', $this->builder->getJsContent()); 456 456 … … 465 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>'; 466 466 $this->assertEqualOrDiff($result, $out); 467 $this->assertEqualOrDiff('c = new jForms ControlString(\'rbchoixsimple\', \'Votre choix\');468 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 469 jForms .tForm.addControl(c);467 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'rbchoixsimple\', \'Votre choix\'); 468 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 469 jFormsJQ.tForm.addControl(c); 470 470 ', $this->builder->getJsContent()); 471 471 … … 490 490 $result.='</select>'; 491 491 $this->assertEqualOrDiff($result, $out); 492 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');493 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 494 jForms .tForm.addControl(c);492 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 493 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 494 jFormsJQ.tForm.addControl(c); 495 495 ', $this->builder->getJsContent()); 496 496 … … 505 505 $result.='</select>'; 506 506 $this->assertEqualOrDiff($result, $out); 507 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');508 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 509 jForms .tForm.addControl(c);507 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 508 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 509 jFormsJQ.tForm.addControl(c); 510 510 ', $this->builder->getJsContent()); 511 511 … … 520 520 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 521 521 $this->assertEqualOrDiff($result, $out); 522 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');523 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 524 jForms .tForm.addControl(c);522 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 523 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 524 jFormsJQ.tForm.addControl(c); 525 525 ', $this->builder->getJsContent()); 526 526 … … 538 538 $result.='</select>'; 539 539 $this->assertEqualOrDiff($result, $out); 540 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');541 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 542 jForms .tForm.addControl(c);540 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 541 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 542 jFormsJQ.tForm.addControl(c); 543 543 ', $this->builder->getJsContent()); 544 544 … … 553 553 $result.='</select>'; 554 554 $this->assertEqualOrDiff($result, $out); 555 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');555 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 556 556 c.required = true; 557 557 c.errRequired=\'La saisie de "Votre choix" est obligatoire\'; 558 558 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 559 jForms .tForm.addControl(c);559 jFormsJQ.tForm.addControl(c); 560 560 ', $this->builder->getJsContent()); 561 561 … … 571 571 $result.='</select>'; 572 572 $this->assertEqualOrDiff($result, $out); 573 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');574 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 575 jForms .tForm.addControl(c);573 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 574 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 575 jFormsJQ.tForm.addControl(c); 576 576 ', $this->builder->getJsContent()); 577 577 … … 587 587 $result.='</select>'; 588 588 $this->assertEqualOrDiff($result, $out); 589 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');590 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 591 jForms .tForm.addControl(c);589 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 590 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 591 jFormsJQ.tForm.addControl(c); 592 592 ', $this->builder->getJsContent()); 593 593 … … 600 600 $result.='</select>'; 601 601 $this->assertEqualOrDiff($result, $out); 602 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');603 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 604 jForms .tForm.addControl(c);602 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 603 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 604 jFormsJQ.tForm.addControl(c); 605 605 ', $this->builder->getJsContent()); 606 606 … … 613 613 $result.='</select>'; 614 614 $this->assertEqualOrDiff($result, $out); 615 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');616 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 617 jForms .tForm.addControl(c);615 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 616 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 617 jFormsJQ.tForm.addControl(c); 618 618 ', $this->builder->getJsContent()); 619 619 … … 632 632 $result.='</select>'; 633 633 $this->assertEqualOrDiff($result, $out); 634 $this->assertEqualOrDiff('c = new jForms ControlString(\'menulist1\', \'Votre choix\');635 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 636 jForms .tForm.addControl(c);634 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'menulist1\', \'Votre choix\'); 635 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 636 jFormsJQ.tForm.addControl(c); 637 637 ', $this->builder->getJsContent()); 638 638 … … 744 744 $result.='</select>'; 745 745 $this->assertEqualOrDiff($result, $out); 746 $this->assertEqualOrDiff('c = new jForms ControlString(\'listbox1\', \'Votre choix\');747 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 748 jForms .tForm.addControl(c);746 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'listbox1\', \'Votre choix\'); 747 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 748 jFormsJQ.tForm.addControl(c); 749 749 ', $this->builder->getJsContent()); 750 750 … … 757 757 $result.='</select>'; 758 758 $this->assertEqualOrDiff($result, $out); 759 $this->assertEqualOrDiff('c = new jForms ControlString(\'listbox1\', \'Votre choix\');760 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 761 jForms .tForm.addControl(c);759 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'listbox1\', \'Votre choix\'); 760 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 761 jFormsJQ.tForm.addControl(c); 762 762 ', $this->builder->getJsContent()); 763 763 … … 772 772 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 773 773 $this->assertEqualOrDiff($result, $out); 774 $this->assertEqualOrDiff('c = new jForms ControlString(\'listbox1\', \'Votre choix\');775 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 776 jForms .tForm.addControl(c);774 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'listbox1\', \'Votre choix\'); 775 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 776 jFormsJQ.tForm.addControl(c); 777 777 ', $this->builder->getJsContent()); 778 778 … … 789 789 $result.='</select>'; 790 790 $this->assertEqualOrDiff($result, $out); 791 $this->assertEqualOrDiff('c = new jForms ControlString(\'listbox1\', \'Votre choix\');792 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 793 jForms .tForm.addControl(c);791 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'listbox1\', \'Votre choix\'); 792 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 793 jFormsJQ.tForm.addControl(c); 794 794 ', $this->builder->getJsContent()); 795 795 … … 814 814 $result.='</select>'; 815 815 $this->assertEqualOrDiff($result, $out); 816 $this->assertEqualOrDiff('c = new jForms ControlString(\'lbchoixmultiple[]\', \'Votre choix\');816 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'lbchoixmultiple[]\', \'Votre choix\'); 817 817 c.multiple = true; 818 818 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 819 jForms .tForm.addControl(c);819 jFormsJQ.tForm.addControl(c); 820 820 ', $this->builder->getJsContent()); 821 821 … … 829 829 $result.='</select>'; 830 830 $this->assertEqualOrDiff($result, $out); 831 $this->assertEqualOrDiff('c = new jForms ControlString(\'lbchoixmultiple[]\', \'Votre choix\');831 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'lbchoixmultiple[]\', \'Votre choix\'); 832 832 c.multiple = true; 833 833 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 834 jForms .tForm.addControl(c);834 jFormsJQ.tForm.addControl(c); 835 835 ', $this->builder->getJsContent()); 836 836 … … 853 853 $result.='</select>'; 854 854 $this->assertEqualOrDiff($result, $out); 855 $this->assertEqualOrDiff('c = new jForms ControlString(\'listbox2\', \'Votre choix\');856 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 857 jForms .tForm.addControl(c);855 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'listbox2\', \'Votre choix\'); 856 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 857 jFormsJQ.tForm.addControl(c); 858 858 ', $this->builder->getJsContent()); 859 859 … … 878 878 $result.='</select>'; 879 879 $this->assertEqualOrDiff($result, $out); 880 $this->assertEqualOrDiff('c = new jForms ControlString(\'lbchoixmultiple2[]\', \'Votre choix\');880 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'lbchoixmultiple2[]\', \'Votre choix\'); 881 881 c.multiple = true; 882 882 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 883 jForms .tForm.addControl(c);883 jFormsJQ.tForm.addControl(c); 884 884 ', $this->builder->getJsContent()); 885 885 … … 902 902 $result.='</select>'; 903 903 $this->assertEqualOrDiff($result, $out); 904 $this->assertEqualOrDiff('c = new jForms ControlString(\'listboxclass\', \'Votre choix\');905 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 906 jForms .tForm.addControl(c);904 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'listboxclass\', \'Votre choix\'); 905 c.errInvalid=\'La saisie de "Votre choix" est invalide\'; 906 jFormsJQ.tForm.addControl(c); 907 907 ', $this->builder->getJsContent()); 908 908 … … 921 921 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 922 922 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" rows="5" cols="40"></textarea>', $out); 923 $this->assertEqualOrDiff('c = new jForms ControlString(\'textarea1\', \'Votre nom\');924 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 925 jForms .tForm.addControl(c);923 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'textarea1\', \'Votre nom\'); 924 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 925 jFormsJQ.tForm.addControl(c); 926 926 ', $this->builder->getJsContent()); 927 927 … … 930 930 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 931 931 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" rows="5" cols="40">laurent</textarea>', $out); 932 $this->assertEqualOrDiff('c = new jForms ControlString(\'textarea1\', \'Votre nom\');933 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 934 jForms .tForm.addControl(c);932 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'textarea1\', \'Votre nom\'); 933 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 934 jFormsJQ.tForm.addControl(c); 935 935 ', $this->builder->getJsContent()); 936 936 … … 939 939 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 940 940 $this->assertEqualOrDiff('<textarea name="textarea1" id="'.$this->formname.'_textarea1" readonly="readonly" class=" jforms-readonly" rows="5" cols="40">laurent</textarea>', $out); 941 $this->assertEqualOrDiff('c = new jForms ControlString(\'textarea1\', \'Votre nom\');942 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 943 jForms .tForm.addControl(c);941 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'textarea1\', \'Votre nom\'); 942 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 943 jFormsJQ.tForm.addControl(c); 944 944 ', $this->builder->getJsContent()); 945 945 … … 951 951 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 952 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); 953 $this->assertEqualOrDiff('c = new jForms ControlString(\'textarea1\', \'Votre nom\');954 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 955 jForms .tForm.addControl(c);953 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'textarea1\', \'Votre nom\'); 954 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 955 jFormsJQ.tForm.addControl(c); 956 956 ', $this->builder->getJsContent()); 957 957 … … 960 960 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 961 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); 962 $this->assertEqualOrDiff('c = new jForms ControlString(\'textarea1\', \'Votre nom\');963 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 964 jForms .tForm.addControl(c);962 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'textarea1\', \'Votre nom\'); 963 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 964 jFormsJQ.tForm.addControl(c); 965 965 ', $this->builder->getJsContent()); 966 966 … … 969 969 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 970 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); 971 $this->assertEqualOrDiff('c = new jForms ControlString(\'textarea1\', \'Votre nom\');972 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 973 jForms .tForm.addControl(c);971 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'textarea1\', \'Votre nom\'); 972 c.errInvalid=\'La saisie de "Votre nom" est invalide\'; 973 jFormsJQ.tForm.addControl(c); 974 974 ', $this->builder->getJsContent()); 975 975 … … 987 987 ob_start();$this->builder->outputControl($ctrl);$out = ob_get_clean(); 988 988 $this->assertEqualOrDiff('<input type="password" name="passwd" id="'.$this->formname.'_passwd" value=""/>', $out); 989 $this->assertEqualOrDiff('c = new jForms ControlString(\'passwd\', \'mot de passe\');989 $this->assertEqualOrDiff('c = new jFormsJQControlString(\'passwd\', \'mot de passe\
