added hidden field

This commit is contained in:
Roland Gruber 2010-09-18 11:36:57 +00:00
parent 18c38f3501
commit 8cd21ed067
1 changed files with 40 additions and 0 deletions

View File

@ -1499,4 +1499,44 @@ class htmlSubTitle extends htmlElement {
}
/**
* Generates a hidden input field.
*
* @package metaHTML
*/
class htmlHiddenInput extends htmlElement {
/** field name */
private $name = null;
/** field value */
private $value = null;
/**
* Constructor.
*
* @param String $label label
*/
function __construct($name, $value) {
$this->name = $name;
$this->value = $value;
}
/**
* 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 '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '">';
return array();
}
}
?>