@@ -434,8 +434,8 @@ discard block |
||
434 | 434 | $jsParts[] = $this->_convertArrayToJavascript($this->_options[$i]); |
435 | 435 | } |
436 | 436 | $this->_js .= "\n_hs_options['" . $this->_escapeString($this->getName()) . "'] = [\n" . |
437 | - implode(",\n", $jsParts) . |
|
438 | - "\n];\n"; |
|
437 | + implode(",\n", $jsParts) . |
|
438 | + "\n];\n"; |
|
439 | 439 | // default value; if we don't actually have any values yet just use |
440 | 440 | // the first option (for single selects) or empty array (for multiple) |
441 | 441 | $values = array(); |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | } |
451 | 451 | } |
452 | 452 | $this->_js .= "_hs_defaults['" . $this->_escapeString($this->getName()) . "'] = " . |
453 | - $this->_convertArrayToJavascript($values, false) . ";\n"; |
|
453 | + $this->_convertArrayToJavascript($values, false) . ";\n"; |
|
454 | 454 | } |
455 | 455 | include_once('HTML/QuickForm/Renderer/Default.php'); |
456 | 456 | $renderer =& new HTML_QuickForm_Renderer_Default(); |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | } |
465 | 465 | } |
466 | 466 | return (empty($this->_js)? '': "<script type=\"text/javascript\">\n//<![CDATA[\n" . $this->_js . "//]]>\n</script>") . |
467 | - $renderer->toHtml(); |
|
467 | + $renderer->toHtml(); |
|
468 | 468 | } // end func toHtml |
469 | 469 | |
470 | 470 | // }}} |
@@ -506,14 +506,14 @@ discard block |
||
506 | 506 | // }}} |
507 | 507 | // {{{ _convertArrayToJavascript() |
508 | 508 | |
509 | - /** |
|
510 | - * Converts PHP array to its Javascript analog |
|
511 | - * |
|
512 | - * @access private |
|
513 | - * @param array PHP array to convert |
|
514 | - * @param bool Generate Javascript object literal (default, works like PHP's associative array) or array literal |
|
515 | - * @return string Javascript representation of the value |
|
516 | - */ |
|
509 | + /** |
|
510 | + * Converts PHP array to its Javascript analog |
|
511 | + * |
|
512 | + * @access private |
|
513 | + * @param array PHP array to convert |
|
514 | + * @param bool Generate Javascript object literal (default, works like PHP's associative array) or array literal |
|
515 | + * @return string Javascript representation of the value |
|
516 | + */ |
|
517 | 517 | function _convertArrayToJavascript($array, $assoc = true) |
518 | 518 | { |
519 | 519 | if (!is_array($array)) { |
@@ -537,13 +537,13 @@ discard block |
||
537 | 537 | // }}} |
538 | 538 | // {{{ _convertScalarToJavascript() |
539 | 539 | |
540 | - /** |
|
541 | - * Converts PHP's scalar value to its Javascript analog |
|
542 | - * |
|
543 | - * @access private |
|
544 | - * @param mixed PHP value to convert |
|
545 | - * @return string Javascript representation of the value |
|
546 | - */ |
|
540 | + /** |
|
541 | + * Converts PHP's scalar value to its Javascript analog |
|
542 | + * |
|
543 | + * @access private |
|
544 | + * @param mixed PHP value to convert |
|
545 | + * @return string Javascript representation of the value |
|
546 | + */ |
|
547 | 547 | function _convertScalarToJavascript($val) |
548 | 548 | { |
549 | 549 | if (is_bool($val)) { |
@@ -563,13 +563,13 @@ discard block |
||
563 | 563 | // }}} |
564 | 564 | // {{{ _escapeString() |
565 | 565 | |
566 | - /** |
|
567 | - * Quotes the string so that it can be used in Javascript string constants |
|
568 | - * |
|
569 | - * @access private |
|
570 | - * @param string |
|
571 | - * @return string |
|
572 | - */ |
|
566 | + /** |
|
567 | + * Quotes the string so that it can be used in Javascript string constants |
|
568 | + * |
|
569 | + * @access private |
|
570 | + * @param string |
|
571 | + * @return string |
|
572 | + */ |
|
573 | 573 | function _escapeString($str) |
574 | 574 | { |
575 | 575 | return strtr($str,array( |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | */ |
69 | 69 | private $_required = array(); |
70 | 70 | |
71 | - /** |
|
72 | - * Whether to change elements' names to $groupName[$elementName] or leave them as is |
|
73 | - * @var bool |
|
74 | - * @since 3.0 |
|
75 | - * @access private |
|
76 | - */ |
|
71 | + /** |
|
72 | + * Whether to change elements' names to $groupName[$elementName] or leave them as is |
|
73 | + * @var bool |
|
74 | + * @since 3.0 |
|
75 | + * @access private |
|
76 | + */ |
|
77 | 77 | private $_appendName = true; |
78 | 78 | |
79 | 79 | /** |
@@ -378,15 +378,15 @@ discard block |
||
378 | 378 | return true; |
379 | 379 | } |
380 | 380 | |
381 | - /** |
|
382 | - * Accepts a renderer |
|
383 | - * |
|
384 | - * @param HTML_QuickForm_Renderer renderer object |
|
385 | - * @param bool Whether a group is required |
|
386 | - * @param string An error message associated with a group |
|
387 | - * @access public |
|
388 | - * @return void |
|
389 | - */ |
|
381 | + /** |
|
382 | + * Accepts a renderer |
|
383 | + * |
|
384 | + * @param HTML_QuickForm_Renderer renderer object |
|
385 | + * @param bool Whether a group is required |
|
386 | + * @param string An error message associated with a group |
|
387 | + * @access public |
|
388 | + * @return void |
|
389 | + */ |
|
390 | 390 | function accept(&$renderer, $required = false, $error = null) |
391 | 391 | { |
392 | 392 | $this->_createElementsIfNotExist(); |
@@ -416,10 +416,10 @@ discard block |
||
416 | 416 | $renderer->finishGroup($this); |
417 | 417 | } |
418 | 418 | |
419 | - /** |
|
420 | - * As usual, to get the group's value we access its elements and call |
|
421 | - * their exportValue() methods |
|
422 | - */ |
|
419 | + /** |
|
420 | + * As usual, to get the group's value we access its elements and call |
|
421 | + * their exportValue() methods |
|
422 | + */ |
|
423 | 423 | function exportValue(&$submitValues, $assoc = false) |
424 | 424 | { |
425 | 425 | $value = null; |
@@ -462,31 +462,31 @@ discard block |
||
462 | 462 | return $value; |
463 | 463 | } |
464 | 464 | |
465 | - /** |
|
466 | - * Creates the group's elements. |
|
467 | - * |
|
468 | - * This should be overriden by child classes that need to create their |
|
469 | - * elements. The method will be called automatically when needed, calling |
|
470 | - * it from the constructor is discouraged as the constructor is usually |
|
471 | - * called _twice_ on element creation, first time with _no_ parameters. |
|
472 | - * |
|
473 | - * @access private |
|
474 | - * @abstract |
|
475 | - */ |
|
465 | + /** |
|
466 | + * Creates the group's elements. |
|
467 | + * |
|
468 | + * This should be overriden by child classes that need to create their |
|
469 | + * elements. The method will be called automatically when needed, calling |
|
470 | + * it from the constructor is discouraged as the constructor is usually |
|
471 | + * called _twice_ on element creation, first time with _no_ parameters. |
|
472 | + * |
|
473 | + * @access private |
|
474 | + * @abstract |
|
475 | + */ |
|
476 | 476 | function _createElements() |
477 | 477 | { |
478 | 478 | // abstract |
479 | 479 | } |
480 | 480 | |
481 | - /** |
|
482 | - * A wrapper around _createElements() |
|
483 | - * |
|
484 | - * This method calls _createElements() if the group's _elements array |
|
485 | - * is empty. It also performs some updates, e.g. freezes the created |
|
486 | - * elements if the group is already frozen. |
|
487 | - * |
|
488 | - * @access private |
|
489 | - */ |
|
481 | + /** |
|
482 | + * A wrapper around _createElements() |
|
483 | + * |
|
484 | + * This method calls _createElements() if the group's _elements array |
|
485 | + * is empty. It also performs some updates, e.g. freezes the created |
|
486 | + * elements if the group is already frozen. |
|
487 | + * |
|
488 | + * @access private |
|
489 | + */ |
|
490 | 490 | function _createElementsIfNotExist() |
491 | 491 | { |
492 | 492 | if (empty($this->_elements)) { |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | */ |
32 | 32 | class HTML_QuickForm_Action_Jump extends HTML_QuickForm_Action |
33 | 33 | { |
34 | - /** |
|
35 | - * Splits (part of) the URI into path and query components |
|
36 | - * |
|
37 | - * @param string String of the form 'foo?bar' |
|
38 | - * @return array Array of the form array('foo', '?bar) |
|
39 | - * @access private |
|
40 | - */ |
|
34 | + /** |
|
35 | + * Splits (part of) the URI into path and query components |
|
36 | + * |
|
37 | + * @param string String of the form 'foo?bar' |
|
38 | + * @return array Array of the form array('foo', '?bar) |
|
39 | + * @access private |
|
40 | + */ |
|
41 | 41 | function _splitUri($uri) |
42 | 42 | { |
43 | 43 | if (false === ($qm = strpos($uri, '?'))) { |
@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
50 | - /** |
|
51 | - * Removes the '..' and '.' segments from the path component |
|
52 | - * |
|
53 | - * @param string Path component of the URL, possibly with '.' and '..' segments |
|
54 | - * @return string Path component of the URL with '.' and '..' segments removed |
|
55 | - * @access private |
|
56 | - */ |
|
50 | + /** |
|
51 | + * Removes the '..' and '.' segments from the path component |
|
52 | + * |
|
53 | + * @param string Path component of the URL, possibly with '.' and '..' segments |
|
54 | + * @return string Path component of the URL with '.' and '..' segments removed |
|
55 | + * @access private |
|
56 | + */ |
|
57 | 57 | function _normalizePath($path) |
58 | 58 | { |
59 | 59 | $pathAry = explode('/', $path); |
@@ -84,17 +84,17 @@ discard block |
||
84 | 84 | return implode('/', $pathAry); |
85 | 85 | } |
86 | 86 | |
87 | - /** |
|
88 | - * Resolves relative URL using current page's URL as base |
|
89 | - * |
|
90 | - * The method follows procedure described in section 4 of RFC 1808 and |
|
91 | - * passes the examples provided in section 5 of said RFC. Values from |
|
92 | - * $_SERVER array are used for calculation of "current URL" |
|
93 | - * |
|
94 | - * @param string Relative URL, probably from form's action attribute |
|
95 | - * @return string Absolute URL |
|
96 | - * @access private |
|
97 | - */ |
|
87 | + /** |
|
88 | + * Resolves relative URL using current page's URL as base |
|
89 | + * |
|
90 | + * The method follows procedure described in section 4 of RFC 1808 and |
|
91 | + * passes the examples provided in section 5 of said RFC. Values from |
|
92 | + * $_SERVER array are used for calculation of "current URL" |
|
93 | + * |
|
94 | + * @param string Relative URL, probably from form's action attribute |
|
95 | + * @return string Absolute URL |
|
96 | + * @access private |
|
97 | + */ |
|
98 | 98 | function _resolveRelativeURL($url) |
99 | 99 | { |
100 | 100 | $https = !empty($_SERVER['HTTPS']) && ('off' != strtolower($_SERVER['HTTPS'])); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | } else { |
106 | 106 | $host = $scheme . '//' . $_SERVER['SERVER_NAME'] . |
107 | - (($https && 443 == $_SERVER['SERVER_PORT'] || |
|
107 | + (($https && 443 == $_SERVER['SERVER_PORT'] || |
|
108 | 108 | !$https && 80 == $_SERVER['SERVER_PORT'])? '': ':' . $_SERVER['SERVER_PORT']); |
109 | 109 | if ('' == $url) { |
110 | 110 | return $host . $_SERVER['REQUEST_URI']; |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $action = $this->_resolveRelativeURL($action); |
149 | 149 | } |
150 | 150 | $url = $action . (false === strpos($action, '?')? '?': '&') . |
151 | - $current->getButtonName('display') . '=true' . |
|
152 | - ((!defined('SID') || '' == SID || ini_get('session.use_only_cookies'))? '': '&' . SID); |
|
151 | + $current->getButtonName('display') . '=true' . |
|
152 | + ((!defined('SID') || '' == SID || ini_get('session.use_only_cookies'))? '': '&' . SID); |
|
153 | 153 | header('Location: ' . $url); |
154 | 154 | exit; |
155 | 155 | } |
@@ -73,15 +73,15 @@ |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | - /** |
|
77 | - * Actually outputs the form. |
|
78 | - * |
|
79 | - * If you want to customize the form's appearance (you most certainly will), |
|
80 | - * then you should override this method. There is no need to override perform() |
|
81 | - * |
|
82 | - * @access private |
|
83 | - * @param HTML_QuickForm_Page the page being processed |
|
84 | - */ |
|
76 | + /** |
|
77 | + * Actually outputs the form. |
|
78 | + * |
|
79 | + * If you want to customize the form's appearance (you most certainly will), |
|
80 | + * then you should override this method. There is no need to override perform() |
|
81 | + * |
|
82 | + * @access private |
|
83 | + * @param HTML_QuickForm_Page the page being processed |
|
84 | + */ |
|
85 | 85 | function _renderForm(&$page) |
86 | 86 | { |
87 | 87 | $page->display(); |
@@ -70,10 +70,10 @@ |
||
70 | 70 | // }}} |
71 | 71 | // {{{ exportValue() |
72 | 72 | |
73 | - /** |
|
74 | - * Only return the value if it is found within $submitValues (i.e. if |
|
75 | - * this particular submit button was clicked) |
|
76 | - */ |
|
73 | + /** |
|
74 | + * Only return the value if it is found within $submitValues (i.e. if |
|
75 | + * this particular submit button was clicked) |
|
76 | + */ |
|
77 | 77 | function exportValue(&$submitValues, $assoc = false) |
78 | 78 | { |
79 | 79 | return $this->_prepareValue($this->_findValue($submitValues), $assoc); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | class HTML_QuickForm_Renderer_Object extends HTML_QuickForm_Renderer |
36 | 36 | { |
37 | - /**#@+ |
|
37 | + /**#@+ |
|
38 | 38 | * @access private |
39 | 39 | */ |
40 | 40 | /** |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | var $_sectionCount; |
51 | 51 | |
52 | 52 | /** |
53 | - * Current section number |
|
54 | - * @var integer $_currentSection |
|
55 | - */ |
|
53 | + * Current section number |
|
54 | + * @var integer $_currentSection |
|
55 | + */ |
|
56 | 56 | var $_currentSection; |
57 | 57 | |
58 | 58 | /** |
59 | - * Object representing current group |
|
60 | - * @var object $_currentGroup |
|
61 | - */ |
|
59 | + * Object representing current group |
|
60 | + * @var object $_currentGroup |
|
61 | + */ |
|
62 | 62 | var $_currentGroup = null; |
63 | 63 | |
64 | 64 | /** |
@@ -68,17 +68,17 @@ discard block |
||
68 | 68 | var $_elementType = 'QuickFormElement'; |
69 | 69 | |
70 | 70 | /** |
71 | - * Additional style information for different elements |
|
72 | - * @var array $_elementStyles |
|
73 | - */ |
|
71 | + * Additional style information for different elements |
|
72 | + * @var array $_elementStyles |
|
73 | + */ |
|
74 | 74 | var $_elementStyles = array(); |
75 | 75 | |
76 | 76 | /** |
77 | - * true: collect all hidden elements into string; false: process them as usual form elements |
|
78 | - * @var bool $_collectHidden |
|
79 | - */ |
|
77 | + * true: collect all hidden elements into string; false: process them as usual form elements |
|
78 | + * @var bool $_collectHidden |
|
79 | + */ |
|
80 | 80 | var $_collectHidden = false; |
81 | - /**#@-*/ |
|
81 | + /**#@-*/ |
|
82 | 82 | |
83 | 83 | |
84 | 84 | /** |
@@ -270,73 +270,73 @@ discard block |
||
270 | 270 | */ |
271 | 271 | class QuickformForm |
272 | 272 | { |
273 | - /** |
|
274 | - * Whether the form has been frozen |
|
275 | - * @var boolean $frozen |
|
276 | - */ |
|
273 | + /** |
|
274 | + * Whether the form has been frozen |
|
275 | + * @var boolean $frozen |
|
276 | + */ |
|
277 | 277 | var $frozen; |
278 | 278 | |
279 | - /** |
|
280 | - * Javascript for client-side validation |
|
281 | - * @var string $javascript |
|
282 | - */ |
|
279 | + /** |
|
280 | + * Javascript for client-side validation |
|
281 | + * @var string $javascript |
|
282 | + */ |
|
283 | 283 | var $javascript; |
284 | 284 | |
285 | - /** |
|
286 | - * Attributes for form tag |
|
287 | - * @var string $attributes |
|
288 | - */ |
|
285 | + /** |
|
286 | + * Attributes for form tag |
|
287 | + * @var string $attributes |
|
288 | + */ |
|
289 | 289 | var $attributes; |
290 | 290 | |
291 | - /** |
|
292 | - * Note about required elements |
|
293 | - * @var string $requirednote |
|
294 | - */ |
|
291 | + /** |
|
292 | + * Note about required elements |
|
293 | + * @var string $requirednote |
|
294 | + */ |
|
295 | 295 | var $requirednote; |
296 | 296 | |
297 | - /** |
|
298 | - * Collected html of all hidden variables |
|
299 | - * @var string $hidden |
|
300 | - */ |
|
297 | + /** |
|
298 | + * Collected html of all hidden variables |
|
299 | + * @var string $hidden |
|
300 | + */ |
|
301 | 301 | var $hidden; |
302 | 302 | |
303 | - /** |
|
304 | - * Set if there were validation errors. |
|
305 | - * StdClass object with element names for keys and their |
|
306 | - * error messages as values |
|
307 | - * @var object $errors |
|
308 | - */ |
|
303 | + /** |
|
304 | + * Set if there were validation errors. |
|
305 | + * StdClass object with element names for keys and their |
|
306 | + * error messages as values |
|
307 | + * @var object $errors |
|
308 | + */ |
|
309 | 309 | var $errors; |
310 | 310 | |
311 | - /** |
|
312 | - * Array of QuickformElementObject elements. If there are headers in the form |
|
313 | - * this will be empty and the elements will be in the |
|
314 | - * separate sections |
|
315 | - * @var array $elements |
|
316 | - */ |
|
311 | + /** |
|
312 | + * Array of QuickformElementObject elements. If there are headers in the form |
|
313 | + * this will be empty and the elements will be in the |
|
314 | + * separate sections |
|
315 | + * @var array $elements |
|
316 | + */ |
|
317 | 317 | var $elements; |
318 | 318 | |
319 | - /** |
|
320 | - * Array of sections contained in the document |
|
321 | - * @var array $sections |
|
322 | - */ |
|
319 | + /** |
|
320 | + * Array of sections contained in the document |
|
321 | + * @var array $sections |
|
322 | + */ |
|
323 | 323 | var $sections; |
324 | 324 | |
325 | - /** |
|
326 | - * Output <form> header |
|
327 | - * {form.outputHeader():h} |
|
328 | - * @return string <form attributes> |
|
329 | - */ |
|
325 | + /** |
|
326 | + * Output <form> header |
|
327 | + * {form.outputHeader():h} |
|
328 | + * @return string <form attributes> |
|
329 | + */ |
|
330 | 330 | function outputHeader() |
331 | 331 | { |
332 | 332 | return "<form " . $this->attributes . ">\n"; |
333 | 333 | } |
334 | 334 | |
335 | - /** |
|
336 | - * Output form javascript |
|
337 | - * {form.outputJavaScript():h} |
|
338 | - * @return string Javascript |
|
339 | - */ |
|
335 | + /** |
|
336 | + * Output form javascript |
|
337 | + * {form.outputJavaScript():h} |
|
338 | + * @return string Javascript |
|
339 | + */ |
|
340 | 340 | function outputJavaScript() |
341 | 341 | { |
342 | 342 | return $this->javascript; |
@@ -441,9 +441,9 @@ discard block |
||
441 | 441 | } |
442 | 442 | |
443 | 443 | |
444 | - /** |
|
445 | - * XXX: why does it use Flexy when all other stuff here does not depend on it? |
|
446 | - */ |
|
444 | + /** |
|
445 | + * XXX: why does it use Flexy when all other stuff here does not depend on it? |
|
446 | + */ |
|
447 | 447 | function outputStyle() |
448 | 448 | { |
449 | 449 | ob_start(); |
@@ -38,88 +38,88 @@ discard block |
||
38 | 38 | */ |
39 | 39 | class HTML_QuickForm_Renderer_ITStatic extends HTML_QuickForm_Renderer |
40 | 40 | { |
41 | - /**#@+ |
|
41 | + /**#@+ |
|
42 | 42 | * @access private |
43 | 43 | */ |
44 | - /** |
|
45 | - * An HTML_Template_IT or some other API compatible Template instance |
|
46 | - * @var object |
|
47 | - */ |
|
44 | + /** |
|
45 | + * An HTML_Template_IT or some other API compatible Template instance |
|
46 | + * @var object |
|
47 | + */ |
|
48 | 48 | var $_tpl = null; |
49 | 49 | |
50 | - /** |
|
51 | - * Rendered form name |
|
52 | - * @var string |
|
53 | - */ |
|
50 | + /** |
|
51 | + * Rendered form name |
|
52 | + * @var string |
|
53 | + */ |
|
54 | 54 | var $_formName = 'form'; |
55 | 55 | |
56 | - /** |
|
57 | - * The errors that were not shown near concrete fields go here |
|
58 | - * @var array |
|
59 | - */ |
|
56 | + /** |
|
57 | + * The errors that were not shown near concrete fields go here |
|
58 | + * @var array |
|
59 | + */ |
|
60 | 60 | var $_errors = array(); |
61 | 61 | |
62 | - /** |
|
63 | - * Show the block with required note? |
|
64 | - * @var bool |
|
65 | - */ |
|
62 | + /** |
|
63 | + * Show the block with required note? |
|
64 | + * @var bool |
|
65 | + */ |
|
66 | 66 | var $_showRequired = false; |
67 | 67 | |
68 | - /** |
|
69 | - * Which group are we currently parsing ? |
|
70 | - * @var string |
|
71 | - */ |
|
68 | + /** |
|
69 | + * Which group are we currently parsing ? |
|
70 | + * @var string |
|
71 | + */ |
|
72 | 72 | var $_inGroup; |
73 | 73 | |
74 | - /** |
|
75 | - * Index of the element in its group |
|
76 | - * @var int |
|
77 | - */ |
|
74 | + /** |
|
75 | + * Index of the element in its group |
|
76 | + * @var int |
|
77 | + */ |
|
78 | 78 | var $_elementIndex = 0; |
79 | 79 | |
80 | - /** |
|
81 | - * If elements have been added with the same name |
|
82 | - * @var array |
|
83 | - */ |
|
80 | + /** |
|
81 | + * If elements have been added with the same name |
|
82 | + * @var array |
|
83 | + */ |
|
84 | 84 | var $_duplicateElements = array(); |
85 | 85 | |
86 | - /** |
|
87 | - * How to handle the required tag for required fields |
|
88 | - * @var string |
|
89 | - */ |
|
86 | + /** |
|
87 | + * How to handle the required tag for required fields |
|
88 | + * @var string |
|
89 | + */ |
|
90 | 90 | var $_required = '{label}<font size="1" color="red">*</font>'; |
91 | 91 | |
92 | - /** |
|
93 | - * How to handle error messages in form validation |
|
94 | - * @var string |
|
95 | - */ |
|
92 | + /** |
|
93 | + * How to handle error messages in form validation |
|
94 | + * @var string |
|
95 | + */ |
|
96 | 96 | var $_error = '<font color="red">{error}</font><br />{html}'; |
97 | 97 | |
98 | - /** |
|
99 | - * Collected HTML for hidden elements, if needed |
|
100 | - * @var string |
|
101 | - */ |
|
98 | + /** |
|
99 | + * Collected HTML for hidden elements, if needed |
|
100 | + * @var string |
|
101 | + */ |
|
102 | 102 | var $_hidden = ''; |
103 | - /**#@-*/ |
|
103 | + /**#@-*/ |
|
104 | 104 | |
105 | - /** |
|
106 | - * Constructor |
|
107 | - * |
|
108 | - * @param HTML_Template_IT|HTML_Template_Sigma Template object to use |
|
109 | - */ |
|
105 | + /** |
|
106 | + * Constructor |
|
107 | + * |
|
108 | + * @param HTML_Template_IT|HTML_Template_Sigma Template object to use |
|
109 | + */ |
|
110 | 110 | function HTML_QuickForm_Renderer_ITStatic(&$tpl) |
111 | 111 | { |
112 | 112 | $this->HTML_QuickForm_Renderer(); |
113 | 113 | $this->_tpl =& $tpl; |
114 | 114 | } // end constructor |
115 | 115 | |
116 | - /** |
|
117 | - * Called when visiting a form, before processing any form elements |
|
118 | - * |
|
119 | - * @param HTML_QuickForm form object being visited |
|
120 | - * @access public |
|
121 | - * @return void |
|
122 | - */ |
|
116 | + /** |
|
117 | + * Called when visiting a form, before processing any form elements |
|
118 | + * |
|
119 | + * @param HTML_QuickForm form object being visited |
|
120 | + * @access public |
|
121 | + * @return void |
|
122 | + */ |
|
123 | 123 | function startForm(&$form) |
124 | 124 | { |
125 | 125 | $this->_formName = $form->getAttribute('id'); |
@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | } |
133 | 133 | } // end func startForm |
134 | 134 | |
135 | - /** |
|
136 | - * Called when visiting a form, after processing all form elements |
|
137 | - * |
|
138 | - * @param HTML_QuickForm form object being visited |
|
139 | - * @access public |
|
140 | - * @return void |
|
141 | - */ |
|
135 | + /** |
|
136 | + * Called when visiting a form, after processing all form elements |
|
137 | + * |
|
138 | + * @param HTML_QuickForm form object being visited |
|
139 | + * @access public |
|
140 | + * @return void |
|
141 | + */ |
|
142 | 142 | function finishForm(&$form) |
143 | 143 | { |
144 | 144 | // display errors above form |
@@ -162,13 +162,13 @@ discard block |
||
162 | 162 | $this->_tpl->setVariable($this->_formName.'_javascript', $form->getValidationScript()); |
163 | 163 | } // end func finishForm |
164 | 164 | |
165 | - /** |
|
166 | - * Called when visiting a header element |
|
167 | - * |
|
168 | - * @param HTML_QuickForm_header header element being visited |
|
169 | - * @access public |
|
170 | - * @return void |
|
171 | - */ |
|
165 | + /** |
|
166 | + * Called when visiting a header element |
|
167 | + * |
|
168 | + * @param HTML_QuickForm_header header element being visited |
|
169 | + * @access public |
|
170 | + * @return void |
|
171 | + */ |
|
172 | 172 | function renderHeader(&$header) |
173 | 173 | { |
174 | 174 | $name = $header->getName(); |
@@ -181,15 +181,15 @@ discard block |
||
181 | 181 | $this->_tpl->setVariable($varName, $header->toHtml()); |
182 | 182 | } // end func renderHeader |
183 | 183 | |
184 | - /** |
|
185 | - * Called when visiting an element |
|
186 | - * |
|
187 | - * @param HTML_QuickForm_element form element being visited |
|
188 | - * @param bool Whether an element is required |
|
189 | - * @param string An error message associated with an element |
|
190 | - * @access public |
|
191 | - * @return void |
|
192 | - */ |
|
184 | + /** |
|
185 | + * Called when visiting an element |
|
186 | + * |
|
187 | + * @param HTML_QuickForm_element form element being visited |
|
188 | + * @param bool Whether an element is required |
|
189 | + * @param string An error message associated with an element |
|
190 | + * @access public |
|
191 | + * @return void |
|
192 | + */ |
|
193 | 193 | function renderElement(&$element, $required, $error) |
194 | 194 | { |
195 | 195 | $name = $element->getName(); |
@@ -257,13 +257,13 @@ discard block |
||
257 | 257 | } |
258 | 258 | } // end func renderElement |
259 | 259 | |
260 | - /** |
|
261 | - * Called when visiting a hidden element |
|
262 | - * |
|
263 | - * @param HTML_QuickForm_element hidden element being visited |
|
264 | - * @access public |
|
265 | - * @return void |
|
266 | - */ |
|
260 | + /** |
|
261 | + * Called when visiting a hidden element |
|
262 | + * |
|
263 | + * @param HTML_QuickForm_element hidden element being visited |
|
264 | + * @access public |
|
265 | + * @return void |
|
266 | + */ |
|
267 | 267 | function renderHidden(&$element) |
268 | 268 | { |
269 | 269 | if ($this->_tpl->placeholderExists($this->_formName . '_hidden')) { |
@@ -275,15 +275,15 @@ discard block |
||
275 | 275 | } |
276 | 276 | } // end func renderHidden |
277 | 277 | |
278 | - /** |
|
279 | - * Called when visiting a group, before processing any group elements |
|
280 | - * |
|
281 | - * @param HTML_QuickForm_group group being visited |
|
282 | - * @param bool Whether a group is required |
|
283 | - * @param string An error message associated with a group |
|
284 | - * @access public |
|
285 | - * @return void |
|
286 | - */ |
|
278 | + /** |
|
279 | + * Called when visiting a group, before processing any group elements |
|
280 | + * |
|
281 | + * @param HTML_QuickForm_group group being visited |
|
282 | + * @param bool Whether a group is required |
|
283 | + * @param string An error message associated with a group |
|
284 | + * @access public |
|
285 | + * @return void |
|
286 | + */ |
|
287 | 287 | function startGroup(&$group, $required, $error) |
288 | 288 | { |
289 | 289 | $name = $group->getName(); |
@@ -328,77 +328,77 @@ discard block |
||
328 | 328 | $this->_inGroup = $varName; |
329 | 329 | } // end func startGroup |
330 | 330 | |
331 | - /** |
|
332 | - * Called when visiting a group, after processing all group elements |
|
333 | - * |
|
334 | - * @param HTML_QuickForm_group group being visited |
|
335 | - * @access public |
|
336 | - * @return void |
|
337 | - */ |
|
331 | + /** |
|
332 | + * Called when visiting a group, after processing all group elements |
|
333 | + * |
|
334 | + * @param HTML_QuickForm_group group being visited |
|
335 | + * @access public |
|
336 | + * @return void |
|
337 | + */ |
|
338 | 338 | function finishGroup(&$group) |
339 | 339 | { |
340 | 340 | $this->_inGroup = ''; |
341 | 341 | } // end func finishGroup |
342 | 342 | |
343 | - /** |
|
344 | - * Sets the way required elements are rendered |
|
345 | - * |
|
346 | - * You can use {label} or {html} placeholders to let the renderer know where |
|
347 | - * where the element label or the element html are positionned according to the |
|
348 | - * required tag. They will be replaced accordingly with the right value. |
|
349 | - * For example: |
|
350 | - * <font color="red">*</font>{label} |
|
351 | - * will put a red star in front of the label if the element is required. |
|
352 | - * |
|
353 | - * @param string The required element template |
|
354 | - * @access public |
|
355 | - * @return void |
|
356 | - */ |
|
343 | + /** |
|
344 | + * Sets the way required elements are rendered |
|
345 | + * |
|
346 | + * You can use {label} or {html} placeholders to let the renderer know where |
|
347 | + * where the element label or the element html are positionned according to the |
|
348 | + * required tag. They will be replaced accordingly with the right value. |
|
349 | + * For example: |
|
350 | + * <font color="red">*</font>{label} |
|
351 | + * will put a red star in front of the label if the element is required. |
|
352 | + * |
|
353 | + * @param string The required element template |
|
354 | + * @access public |
|
355 | + * @return void |
|
356 | + */ |
|
357 | 357 | function setRequiredTemplate($template) |
358 | 358 | { |
359 | 359 | $this->_required = $template; |
360 | 360 | } // end func setRequiredTemplate |
361 | 361 | |
362 | - /** |
|
363 | - * Sets the way elements with validation errors are rendered |
|
364 | - * |
|
365 | - * You can use {label} or {html} placeholders to let the renderer know where |
|
366 | - * where the element label or the element html are positionned according to the |
|
367 | - * error message. They will be replaced accordingly with the right value. |
|
368 | - * The error message will replace the {error} place holder. |
|
369 | - * For example: |
|
370 | - * <font color="red">{error}</font><br />{html} |
|
371 | - * will put the error message in red on top of the element html. |
|
372 | - * |
|
373 | - * If you want all error messages to be output in the main error block, do not specify |
|
374 | - * {html} nor {label}. |
|
375 | - * |
|
376 | - * Groups can have special layouts. With this kind of groups, the renderer will need |
|
377 | - * to know where to place the error message. In this case, use error blocks like: |
|
378 | - * <!-- BEGIN form_group_error -->{form_group_error}<!-- END form_group_error --> |
|
379 | - * where you want the error message to appear in the form. |
|
380 | - * |
|
381 | - * @param string The element error template |
|
382 | - * @access public |
|
383 | - * @return void |
|
384 | - */ |
|
362 | + /** |
|
363 | + * Sets the way elements with validation errors are rendered |
|
364 | + * |
|
365 | + * You can use {label} or {html} placeholders to let the renderer know where |
|
366 | + * where the element label or the element html are positionned according to the |
|
367 | + * error message. They will be replaced accordingly with the right value. |
|
368 | + * The error message will replace the {error} place holder. |
|
369 | + * For example: |
|
370 | + * <font color="red">{error}</font><br />{html} |
|
371 | + * will put the error message in red on top of the element html. |
|
372 | + * |
|
373 | + * If you want all error messages to be output in the main error block, do not specify |
|
374 | + * {html} nor {label}. |
|
375 | + * |
|
376 | + * Groups can have special layouts. With this kind of groups, the renderer will need |
|
377 | + * to know where to place the error message. In this case, use error blocks like: |
|
378 | + * <!-- BEGIN form_group_error -->{form_group_error}<!-- END form_group_error --> |
|
379 | + * where you want the error message to appear in the form. |
|
380 | + * |
|
381 | + * @param string The element error template |
|
382 | + * @access public |
|
383 | + * @return void |
|
384 | + */ |
|
385 | 385 | function setErrorTemplate($template) |
386 | 386 | { |
387 | 387 | $this->_error = $template; |
388 | 388 | } // end func setErrorTemplate |
389 | 389 | |
390 | - /** |
|
391 | - * Called when an element is required |
|
392 | - * |
|
393 | - * This method will add the required tag to the element label and/or the element html |
|
394 | - * such as defined with the method setRequiredTemplate |
|
395 | - * |
|
396 | - * @param string The element label |
|
397 | - * @param string The element html rendering |
|
398 | - * @see setRequiredTemplate() |
|
399 | - * @access private |
|
400 | - * @return void |
|
401 | - */ |
|
390 | + /** |
|
391 | + * Called when an element is required |
|
392 | + * |
|
393 | + * This method will add the required tag to the element label and/or the element html |
|
394 | + * such as defined with the method setRequiredTemplate |
|
395 | + * |
|
396 | + * @param string The element label |
|
397 | + * @param string The element html rendering |
|
398 | + * @see setRequiredTemplate() |
|
399 | + * @access private |
|
400 | + * @return void |
|
401 | + */ |
|
402 | 402 | function _renderRequired(&$label, &$html) |
403 | 403 | { |
404 | 404 | if ($this->_tpl->blockExists($tplBlock = $this->_formName . '_required_block')) { |
@@ -428,20 +428,20 @@ discard block |
||
428 | 428 | } |
429 | 429 | } // end func _renderRequired |
430 | 430 | |
431 | - /** |
|
432 | - * Called when an element has a validation error |
|
433 | - * |
|
434 | - * This method will add the error message to the element label or the element html |
|
435 | - * such as defined with the method setErrorTemplate. If the error placeholder is not found |
|
436 | - * in the template, the error will be displayed in the form error block. |
|
437 | - * |
|
438 | - * @param string The element label |
|
439 | - * @param string The element html rendering |
|
440 | - * @param string The element error |
|
441 | - * @see setErrorTemplate() |
|
442 | - * @access private |
|
443 | - * @return void |
|
444 | - */ |
|
431 | + /** |
|
432 | + * Called when an element has a validation error |
|
433 | + * |
|
434 | + * This method will add the error message to the element label or the element html |
|
435 | + * such as defined with the method setErrorTemplate. If the error placeholder is not found |
|
436 | + * in the template, the error will be displayed in the form error block. |
|
437 | + * |
|
438 | + * @param string The element label |
|
439 | + * @param string The element html rendering |
|
440 | + * @param string The element error |
|
441 | + * @see setErrorTemplate() |
|
442 | + * @access private |
|
443 | + * @return void |
|
444 | + */ |
|
445 | 445 | function _renderError(&$label, &$html, $error) |
446 | 446 | { |
447 | 447 | if ($this->_tpl->blockExists($tplBlock = $this->_formName . '_error_block')) { |
@@ -473,15 +473,15 @@ discard block |
||
473 | 473 | }// end func _renderError |
474 | 474 | |
475 | 475 | |
476 | - /** |
|
477 | - * Returns the block's contents |
|
478 | - * |
|
479 | - * The method is needed because ITX and Sigma implement clearing |
|
480 | - * the block contents on get() a bit differently |
|
481 | - * |
|
482 | - * @param string Block name |
|
483 | - * @return string Block contents |
|
484 | - */ |
|
476 | + /** |
|
477 | + * Returns the block's contents |
|
478 | + * |
|
479 | + * The method is needed because ITX and Sigma implement clearing |
|
480 | + * the block contents on get() a bit differently |
|
481 | + * |
|
482 | + * @param string Block name |
|
483 | + * @return string Block contents |
|
484 | + */ |
|
485 | 485 | function _getTplBlock($block) |
486 | 486 | { |
487 | 487 | $this->_tpl->parse($block); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | class HTML_QuickForm_Renderer_ObjectFlexy extends HTML_QuickForm_Renderer_Object |
52 | 52 | { |
53 | - /**#@+ |
|
53 | + /**#@+ |
|
54 | 54 | * @access private |
55 | 55 | */ |
56 | 56 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @var string $_elementType |
92 | 92 | */ |
93 | 93 | var $_elementType = 'QuickformFlexyElement'; |
94 | - /**#@-*/ |
|
94 | + /**#@-*/ |
|
95 | 95 | |
96 | 96 | /** |
97 | 97 | * Constructor |
@@ -56,128 +56,128 @@ discard block |
||
56 | 56 | $this->customElementTemplate = $customElementTemplate; |
57 | 57 | } |
58 | 58 | |
59 | - /** |
|
60 | - * The HTML of the form |
|
61 | - * @var string |
|
62 | - * @access private |
|
63 | - */ |
|
59 | + /** |
|
60 | + * The HTML of the form |
|
61 | + * @var string |
|
62 | + * @access private |
|
63 | + */ |
|
64 | 64 | var $_html; |
65 | 65 | |
66 | - /** |
|
67 | - * Header Template string |
|
68 | - * @var string |
|
69 | - * @access private |
|
70 | - */ |
|
66 | + /** |
|
67 | + * Header Template string |
|
68 | + * @var string |
|
69 | + * @access private |
|
70 | + */ |
|
71 | 71 | var $_headerTemplate = |
72 | 72 | "\n\t<tr>\n\t\t<td style=\"white-space: nowrap; background-color: #CCCCCC;\" align=\"left\" valign=\"top\" colspan=\"2\"><b>{header}</b></td>\n\t</tr>"; |
73 | 73 | |
74 | - /** |
|
75 | - * Element template string |
|
76 | - * @var string |
|
77 | - * @access private |
|
78 | - */ |
|
74 | + /** |
|
75 | + * Element template string |
|
76 | + * @var string |
|
77 | + * @access private |
|
78 | + */ |
|
79 | 79 | var $_elementTemplate = |
80 | 80 | "\n\t<tr>\n\t\t<td align=\"right\" valign=\"top\"><!-- BEGIN required --><span style=\"color: #ff0000\">*</span><!-- END required --><b>{label}</b></td>\n\t\t<td valign=\"top\" align=\"left\"><!-- BEGIN error --><span style=\"color: #ff0000\">{error}</span><br /><!-- END error -->\t{element}</td>\n\t</tr>"; |
81 | 81 | |
82 | - /** |
|
83 | - * Form template string |
|
84 | - * @var string |
|
85 | - * @access private |
|
86 | - */ |
|
82 | + /** |
|
83 | + * Form template string |
|
84 | + * @var string |
|
85 | + * @access private |
|
86 | + */ |
|
87 | 87 | var $_formTemplate = |
88 | 88 | "\n<form{attributes}>\n<div>\n{hidden}<table border=\"0\">\n{content}\n</table>\n</div>\n</form>"; |
89 | 89 | |
90 | - /** |
|
91 | - * Required Note template string |
|
92 | - * @var string |
|
93 | - * @access private |
|
94 | - */ |
|
90 | + /** |
|
91 | + * Required Note template string |
|
92 | + * @var string |
|
93 | + * @access private |
|
94 | + */ |
|
95 | 95 | var $_requiredNoteTemplate = |
96 | 96 | "\n\t<tr>\n\t\t<td></td>\n\t<td align=\"left\" valign=\"top\">{requiredNote}</td>\n\t</tr>"; |
97 | 97 | |
98 | - /** |
|
99 | - * Array containing the templates for customised elements |
|
100 | - * @var array |
|
101 | - * @access private |
|
102 | - */ |
|
98 | + /** |
|
99 | + * Array containing the templates for customised elements |
|
100 | + * @var array |
|
101 | + * @access private |
|
102 | + */ |
|
103 | 103 | var $_templates = array(); |
104 | 104 | |
105 | - /** |
|
106 | - * Array containing the templates for group wraps. |
|
107 | - * |
|
108 | - * These templates are wrapped around group elements and groups' own |
|
109 | - * templates wrap around them. This is set by setGroupTemplate(). |
|
110 | - * |
|
111 | - * @var array |
|
112 | - * @access private |
|
113 | - */ |
|
105 | + /** |
|
106 | + * Array containing the templates for group wraps. |
|
107 | + * |
|
108 | + * These templates are wrapped around group elements and groups' own |
|
109 | + * templates wrap around them. This is set by setGroupTemplate(). |
|
110 | + * |
|
111 | + * @var array |
|
112 | + * @access private |
|
113 | + */ |
|
114 | 114 | var $_groupWraps = array(); |
115 | 115 | |
116 | - /** |
|
117 | - * Array containing the templates for elements within groups |
|
118 | - * @var array |
|
119 | - * @access private |
|
120 | - */ |
|
116 | + /** |
|
117 | + * Array containing the templates for elements within groups |
|
118 | + * @var array |
|
119 | + * @access private |
|
120 | + */ |
|
121 | 121 | var $_groupTemplates = array(); |
122 | 122 | |
123 | - /** |
|
124 | - * True if we are inside a group |
|
125 | - * @var bool |
|
126 | - * @access private |
|
127 | - */ |
|
123 | + /** |
|
124 | + * True if we are inside a group |
|
125 | + * @var bool |
|
126 | + * @access private |
|
127 | + */ |
|
128 | 128 | var $_inGroup = false; |
129 | 129 | |
130 | - /** |
|
131 | - * Array with HTML generated for group elements |
|
132 | - * @var array |
|
133 | - * @access private |
|
134 | - */ |
|
130 | + /** |
|
131 | + * Array with HTML generated for group elements |
|
132 | + * @var array |
|
133 | + * @access private |
|
134 | + */ |
|
135 | 135 | var $_groupElements = array(); |
136 | 136 | |
137 | - /** |
|
138 | - * Template for an element inside a group |
|
139 | - * @var string |
|
140 | - * @access private |
|
141 | - */ |
|
137 | + /** |
|
138 | + * Template for an element inside a group |
|
139 | + * @var string |
|
140 | + * @access private |
|
141 | + */ |
|
142 | 142 | var $_groupElementTemplate = ''; |
143 | 143 | |
144 | - /** |
|
145 | - * HTML that wraps around the group elements |
|
146 | - * @var string |
|
147 | - * @access private |
|
148 | - */ |
|
144 | + /** |
|
145 | + * HTML that wraps around the group elements |
|
146 | + * @var string |
|
147 | + * @access private |
|
148 | + */ |
|
149 | 149 | var $_groupWrap = ''; |
150 | 150 | |
151 | - /** |
|
152 | - * HTML for the current group |
|
153 | - * @var string |
|
154 | - * @access private |
|
155 | - */ |
|
151 | + /** |
|
152 | + * HTML for the current group |
|
153 | + * @var string |
|
154 | + * @access private |
|
155 | + */ |
|
156 | 156 | var $_groupTemplate = ''; |
157 | 157 | |
158 | - /** |
|
159 | - * Collected HTML of the hidden fields |
|
160 | - * @var string |
|
161 | - * @access private |
|
162 | - */ |
|
158 | + /** |
|
159 | + * Collected HTML of the hidden fields |
|
160 | + * @var string |
|
161 | + * @access private |
|
162 | + */ |
|
163 | 163 | var $_hiddenHtml = ''; |
164 | 164 | |
165 | - /** |
|
166 | - * Constructor |
|
167 | - * |
|
168 | - * @access public |
|
169 | - */ |
|
165 | + /** |
|
166 | + * Constructor |
|
167 | + * |
|
168 | + * @access public |
|
169 | + */ |
|
170 | 170 | public function HTML_QuickForm_Renderer_Default() |
171 | 171 | { |
172 | 172 | parent::__construct(); |
173 | 173 | } // end constructor |
174 | 174 | |
175 | - /** |
|
176 | - * returns the HTML generated for the form |
|
177 | - * |
|
178 | - * @access public |
|
179 | - * @return string |
|
180 | - */ |
|
175 | + /** |
|
176 | + * returns the HTML generated for the form |
|
177 | + * |
|
178 | + * @access public |
|
179 | + * @return string |
|
180 | + */ |
|
181 | 181 | public function toHtml() |
182 | 182 | { |
183 | 183 | // _hiddenHtml is cleared in finishForm(), so this only matters when |
@@ -185,13 +185,13 @@ discard block |
||
185 | 185 | return $this->_hiddenHtml . $this->_html; |
186 | 186 | } // end func toHtml |
187 | 187 | |
188 | - /** |
|
189 | - * Called when visiting a form, before processing any form elements |
|
190 | - * |
|
191 | - * @param HTML_QuickForm form object being visited |
|
192 | - * @access public |
|
193 | - * @return void |
|
194 | - */ |
|
188 | + /** |
|
189 | + * Called when visiting a form, before processing any form elements |
|
190 | + * |
|
191 | + * @param HTML_QuickForm form object being visited |
|
192 | + * @access public |
|
193 | + * @return void |
|
194 | + */ |
|
195 | 195 | function startForm(&$form) |
196 | 196 | { |
197 | 197 | $this->setForm($form); |
@@ -218,14 +218,14 @@ discard block |
||
218 | 218 | |
219 | 219 | |
220 | 220 | |
221 | - /** |
|
222 | - * Called when visiting a form, after processing all form elements |
|
223 | - * Adds required note, form attributes, validation javascript and form content. |
|
224 | - * |
|
225 | - * @param HTML_QuickForm form object being visited |
|
226 | - * @access public |
|
227 | - * @return void |
|
228 | - */ |
|
221 | + /** |
|
222 | + * Called when visiting a form, after processing all form elements |
|
223 | + * Adds required note, form attributes, validation javascript and form content. |
|
224 | + * |
|
225 | + * @param HTML_QuickForm form object being visited |
|
226 | + * @access public |
|
227 | + * @return void |
|
228 | + */ |
|
229 | 229 | public function finishForm(&$form) |
230 | 230 | { |
231 | 231 | // add a required note, if one is needed |
@@ -248,13 +248,13 @@ discard block |
||
248 | 248 | } |
249 | 249 | } // end func finishForm |
250 | 250 | |
251 | - /** |
|
252 | - * Called when visiting a header element |
|
253 | - * |
|
254 | - * @param HTML_QuickForm_header header element being visited |
|
255 | - * @access public |
|
256 | - * @return void |
|
257 | - */ |
|
251 | + /** |
|
252 | + * Called when visiting a header element |
|
253 | + * |
|
254 | + * @param HTML_QuickForm_header header element being visited |
|
255 | + * @access public |
|
256 | + * @return void |
|
257 | + */ |
|
258 | 258 | function renderHeader(&$header) |
259 | 259 | { |
260 | 260 | $name = $header->getName(); |
@@ -265,17 +265,17 @@ discard block |
||
265 | 265 | } |
266 | 266 | } // end func renderHeader |
267 | 267 | |
268 | - /** |
|
269 | - * Helper method for renderElement |
|
270 | - * |
|
271 | - * @param HTML_QuickForm_element $element |
|
272 | - * @param bool Whether an element is required |
|
273 | - * @param string $required Error message associated with the element |
|
274 | - * @param string $error Label for ID |
|
275 | - * @access private |
|
276 | - * @see renderElement() |
|
277 | - * @return string Html for element |
|
278 | - */ |
|
268 | + /** |
|
269 | + * Helper method for renderElement |
|
270 | + * |
|
271 | + * @param HTML_QuickForm_element $element |
|
272 | + * @param bool Whether an element is required |
|
273 | + * @param string $required Error message associated with the element |
|
274 | + * @param string $error Label for ID |
|
275 | + * @access private |
|
276 | + * @see renderElement() |
|
277 | + * @return string Html for element |
|
278 | + */ |
|
279 | 279 | private function _prepareTemplate(HTML_QuickForm_element $element, $required, $error) |
280 | 280 | { |
281 | 281 | $name = $element->getName(); |
@@ -343,16 +343,16 @@ discard block |
||
343 | 343 | return $html; |
344 | 344 | } // end func _prepareTemplate |
345 | 345 | |
346 | - /** |
|
347 | - * Renders an element Html |
|
348 | - * Called when visiting an element |
|
349 | - * |
|
350 | - * @param HTML_QuickForm_element form element being visited |
|
351 | - * @param bool Whether an element is required |
|
352 | - * @param string An error message associated with an element |
|
353 | - * @access public |
|
354 | - * @return void |
|
355 | - */ |
|
346 | + /** |
|
347 | + * Renders an element Html |
|
348 | + * Called when visiting an element |
|
349 | + * |
|
350 | + * @param HTML_QuickForm_element form element being visited |
|
351 | + * @param bool Whether an element is required |
|
352 | + * @param string An error message associated with an element |
|
353 | + * @access public |
|
354 | + * @return void |
|
355 | + */ |
|
356 | 356 | public function renderElement(&$element, $required, $error) |
357 | 357 | { |
358 | 358 | if (!$this->_inGroup) { |
@@ -379,40 +379,40 @@ discard block |
||
379 | 379 | } |
380 | 380 | } // end func renderElement |
381 | 381 | |
382 | - /** |
|
383 | - * Renders an hidden element |
|
384 | - * Called when visiting a hidden element |
|
385 | - * |
|
386 | - * @param HTML_QuickForm_element form element being visited |
|
387 | - * @access public |
|
388 | - * @return void |
|
389 | - */ |
|
382 | + /** |
|
383 | + * Renders an hidden element |
|
384 | + * Called when visiting a hidden element |
|
385 | + * |
|
386 | + * @param HTML_QuickForm_element form element being visited |
|
387 | + * @access public |
|
388 | + * @return void |
|
389 | + */ |
|
390 | 390 | function renderHidden(&$element) |
391 | 391 | { |
392 | 392 | $this->_hiddenHtml .= $element->toHtml() . "\n"; |
393 | 393 | } // end func renderHidden |
394 | 394 | |
395 | - /** |
|
396 | - * Called when visiting a raw HTML/text pseudo-element |
|
397 | - * |
|
398 | - * @param HTML_QuickForm_html element being visited |
|
399 | - * @access public |
|
400 | - * @return void |
|
401 | - */ |
|
395 | + /** |
|
396 | + * Called when visiting a raw HTML/text pseudo-element |
|
397 | + * |
|
398 | + * @param HTML_QuickForm_html element being visited |
|
399 | + * @access public |
|
400 | + * @return void |
|
401 | + */ |
|
402 | 402 | function renderHtml(&$data) |
403 | 403 | { |
404 | 404 | $this->_html .= $data->toHtml(); |
405 | 405 | } // end func renderHtml |
406 | 406 | |
407 | - /** |
|
408 | - * Called when visiting a group, before processing any group elements |
|
409 | - * |
|
410 | - * @param HTML_QuickForm_group group being visited |
|
411 | - * @param bool Whether a group is required |
|
412 | - * @param string An error message associated with a group |
|
413 | - * @access public |
|
414 | - * @return void |
|
415 | - */ |
|
407 | + /** |
|
408 | + * Called when visiting a group, before processing any group elements |
|
409 | + * |
|
410 | + * @param HTML_QuickForm_group group being visited |
|
411 | + * @param bool Whether a group is required |
|
412 | + * @param string An error message associated with a group |
|
413 | + * @access public |
|
414 | + * @return void |
|
415 | + */ |
|
416 | 416 | function startGroup(&$group, $required, $error) |
417 | 417 | { |
418 | 418 | $name = $group->getName(); |
@@ -423,13 +423,13 @@ discard block |
||
423 | 423 | $this->_inGroup = true; |
424 | 424 | } // end func startGroup |
425 | 425 | |
426 | - /** |
|
427 | - * Called when visiting a group, after processing all group elements |
|
428 | - * |
|
429 | - * @param HTML_QuickForm_group group being visited |
|
430 | - * @access public |
|
431 | - * @return void |
|
432 | - */ |
|
426 | + /** |
|
427 | + * Called when visiting a group, after processing all group elements |
|
428 | + * |
|
429 | + * @param HTML_QuickForm_group group being visited |
|
430 | + * @access public |
|
431 | + * @return void |
|
432 | + */ |
|
433 | 433 | function finishGroup(&$group) |
434 | 434 | { |
435 | 435 | $separator = $group->_separator; |