Patch 19: fixed multi-value input field

This commit is contained in:
Roland Gruber 2017-07-19 20:33:28 +02:00
parent b99aa5729d
commit ae64c43e2f
1 changed files with 2 additions and 0 deletions

View File

@ -1408,12 +1408,14 @@ abstract class baseModule {
if ($label !== null) { if ($label !== null) {
$labelTextOut = new htmlOutputText($label); $labelTextOut = new htmlOutputText($label);
$labelTextOut->alignment = htmlElement::ALIGN_TOP; $labelTextOut->alignment = htmlElement::ALIGN_TOP;
$labelTextOut->setMarkAsRequired($required);
$container->addElement($labelTextOut); $container->addElement($labelTextOut);
} }
$subContainer = new htmlTable(); $subContainer = new htmlTable();
$subContainer->alignment = htmlElement::ALIGN_TOP; $subContainer->alignment = htmlElement::ALIGN_TOP;
for ($i = 0; $i < sizeof($values); $i++) { for ($i = 0; $i < sizeof($values); $i++) {
$input = new htmlSelect($attrName . '_' . $i, $options, array($values[$i]), $fieldSize); $input = new htmlSelect($attrName . '_' . $i, $options, array($values[$i]), $fieldSize);
$input->setHasDescriptiveElements($hasDescriptiveOptions);
$subContainer->addElement($input); $subContainer->addElement($input);
if (!empty($htmlIDs)) { if (!empty($htmlIDs)) {
$htmlIDs[] = $attrName . '_' . $i; $htmlIDs[] = $attrName . '_' . $i;