From 3ef2f00a9e98873cf55c8872c622e5cc1f14d15f Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 4 Sep 2010 12:40:42 +0000 Subject: [PATCH] new class htmlSubtitle --- lam/lib/html.inc | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/lam/lib/html.inc b/lam/lib/html.inc index a59edf50..0892f8fd 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -1282,7 +1282,7 @@ class htmlStatusMessage extends htmlElement { } /** - * Text area with label and help link. + * Generates a fieldset. * * @package metaHTML */ @@ -1339,4 +1339,47 @@ class htmlFieldset extends htmlElement { } +/** + * Generates a subtitle line. This is used to group multiple fields. + * + * @package metaHTML + */ +class htmlSubTitle extends htmlElement { + + /** descriptive label */ + private $label = null; + + /** + * Constructor. + * + * @param String $label label + */ + function __construct($label) { + $this->label = htmlspecialchars($label); + // the title should not end at a table cell + $this->colspan = 100; + } + + /** + * Prints the HTML code for this element. + * + * @param string $module Name of account module + * @param array $input List of meta-HTML elements + * @param array $values List of values which override the defaults in $input (name => value) + * @param boolean $restricted If true then no buttons will be displayed + * @param integer $tabindex Start value of tabulator index for input fields + * @param string $scope Account type + * @return array List of input field names and their type (name => type) + */ + function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) { + echo "
\n"; + echo "
\n"; + echo $this->label; + echo "
\n"; + echo "
\n"; + return array(); + } + +} + ?>