Remove tooltips where no additional information is available

This commit is contained in:
Joshua Ramon Enslin 2019-09-01 20:59:25 +02:00 committed by Stefan Rohde-Enslin
parent 250aac25ce
commit c282cfcff3

View File

@ -71,12 +71,20 @@ foreach ($availableFields as $headline => $fields) {
";
foreach($fields as $fieldName => $field) {
if (!empty($field['remark']) or !empty($field['explica'])) $hasTooltip = true;
else $hasTooltip = false;
echo "
<li data-alt='{$field['name_human_readable']}' data-value='{$fieldName}' data-for='{$fieldName}' class='newToolTipTag";
<li data-alt='{$field['name_human_readable']}' data-value='{$fieldName}' data-for='{$fieldName}' class='";
if ($hasTooltip === true) echo " newToolTipTag";
if ($field['required'] === true) echo " requiredField";
echo "'>{$fieldName}";
$toolTip = generateHelpTooltip($fieldName, $field['name_human_readable'], "{$field['remark']}</p><h5>General</h5><p>" . $field['explica']);
$tooltips[] = $toolTip[0];
if (!empty($field['explica'])) $toolTipExplica = "</p><h5>General</h5><p>" . $field['explica'];
else $toolTipExplica = "";
$toolTip = generateHelpTooltip($fieldName, $field['name_human_readable'], "{$field['remark']}{$toolTipExplica}");
if ($hasTooltip) $tooltips[] = $toolTip[0];
echo "</li>";
}