diff --git a/lam/lib/html.inc b/lam/lib/html.inc index ec5ea318..500671ed 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -2588,4 +2588,56 @@ class htmlJavaScript extends htmlElement { } +/** + * Sets all given elements to the same width. + * + * @package metaHTML + */ +class htmlEqualWidth extends htmlElement { + + /** list of element IDs */ + private $elements = array(); + + /** + * Constructor. + * + * @param array $elements list of element IDs + */ + function __construct($elements) { + foreach ($elements as $element) { + $this->elements[] = htmlspecialchars($element); + } + } + + /** + * 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) { + if (sizeof($this->elements) == 0) { + return array(); + } + $return = array(); + $listContent = "'#" . $this->elements[0] . "'"; + for ($i = 1; $i < sizeof($this->elements); $i++) { + $listContent .= ", '#" . $this->elements[$i] . "'"; + } + echo ''; + return $return; + } + +} + ?>