new class htmlSubtitle

This commit is contained in:
Roland Gruber 2010-09-04 12:40:42 +00:00
parent bd131cc36c
commit 3ef2f00a9e
1 changed files with 44 additions and 1 deletions

View File

@ -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 "<div class=\"subTitle\">\n";
echo "<div class=\"subTitleText\">\n";
echo $this->label;
echo "</div>\n";
echo "<hr></div>\n";
return array();
}
}
?>