Skip to content

Commit 9de88ff

Browse files
author
mreishman
committed
Uses old logic if only one tab to show
1 parent e16f1db commit 9de88ff

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

core/php/functions/watchlistFunctions.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,19 @@ function generateWatchlistBlock($defaultArray, $arrayKeys, $key = "{{key}}", $it
1919
<input class='inputWidth300' type='text' name='watchListKey" . $i . "' value='" . $key . "'>";
2020
$j = 0;
2121
$stringToReturn .= "<div style=\"border-bottom: 1px solid black; margin-bottom: 5px; padding: 5px;\">";
22-
foreach($defaultArray as $groupName => $groupData)
22+
if(count($defaultArray) > 1)
2323
{
24-
$stringToReturn .= "<span class=\"buttonButton\" style=\"margin-right: 5px;\" onclick=\"toggleSettingsGroupSection('".$i."','".$groupName."');\" >".$groupName."</span>";
24+
foreach($defaultArray as $groupName => $groupData)
25+
{
26+
$stringToReturn .= "<span class=\"buttonButton\" style=\"margin-right: 5px;\" onclick=\"toggleSettingsGroupSection('".$i."','".$groupName."');\" >".$groupName."</span>";
27+
}
28+
}
29+
else
30+
{
31+
foreach($defaultArray as $groupName => $groupData)
32+
{
33+
$stringToReturn .= "<h4 style=\"margin: 5px;\">".$groupName."</h4>";
34+
}
2535
}
2636
$stringToReturn .= "</div>";
2737
foreach($defaultArray as $groupName => $groupData)

0 commit comments

Comments
 (0)