less space

This commit is contained in:
Roland Gruber 2019-09-02 18:04:21 +02:00
parent 065232505e
commit 967ff33b34
1 changed files with 13 additions and 9 deletions

View File

@ -1395,6 +1395,8 @@ abstract class baseModule {
$container->addLabel($labelTextOut); $container->addLabel($labelTextOut);
} }
} }
$help = new htmlHelpLink($attrName);
$help->alignment = htmlElement::ALIGN_TOP;
$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++) {
@ -1429,28 +1431,30 @@ abstract class baseModule {
$htmlIDs[] = $attrName . '_' . $i; $htmlIDs[] = $attrName . '_' . $i;
} }
if (!empty($values[$i])) { if (!empty($values[$i])) {
$subContainer->addElement(new htmlButton('del_' . $attrName . '_' . $i, 'del.png', true)); $delButton = new htmlButton('del_' . $attrName . '_' . $i, 'del.png', true);
$delButton->setCSSClasses(array('noMarginSides'));
$subContainer->addElement($delButton);
} }
if ($i == 0) { if ($i == 0) {
$subContainer->addElement(new htmlButton('add_' . $attrName, 'add.png', true)); $addButton = new htmlButton('add_' . $attrName, 'add.png', true);
$addButton->setCSSClasses(array('noMarginSides'));
$subContainer->addElement($addButton);
if ($container instanceof htmlResponsiveRow) {
$subContainer->addElement($help);
}
} }
$subContainer->addNewLine(); $subContainer->addNewLine();
} }
$help = new htmlHelpLink($attrName);
$help->alignment = htmlElement::ALIGN_TOP;
if ($container instanceof htmlTable) { if ($container instanceof htmlTable) {
$container->addElement($subContainer); $container->addElement($subContainer);
$container->addElement($help, true); $container->addElement($help, true);
} }
else { else {
$subContainerWithHelp = new htmlTable();
$subContainerWithHelp->addElement($subContainer);
$subContainerWithHelp->addElement($help, true);
if ($label !== null) { if ($label !== null) {
$container->addField($subContainerWithHelp); $container->addField($subContainer);
} }
else { else {
$container->add($subContainerWithHelp, 12); $container->add($subContainer, 12);
} }
} }
} }