Skip to content

Commit

Permalink
Merge pull request #152 from Astu04/develop
Browse files Browse the repository at this point in the history
Add a place holder for when there is no group
  • Loading branch information
bbdoc authored Jul 25, 2023
2 parents c96c414 + 4d4ee0d commit 8b23b39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modal/areas_modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@
echo "<div class='accordion' id='accordion'>";

foreach ($areas as $group => $areaList) {
// Check if $group is empty or null, and set the default text accordingly
$buttonText = !empty($group) ? $group : "No group";
$updatedGroup = str_replace(' ', '_', $group);

echo "<div class='card'>
<div class='card-header' id='heading$updatedGroup'>
<h5 class='mb-0'>
<button class='btn btn-link $collapsedState' type='button' data-toggle='collapse' data-target='#collapse$updatedGroup' aria-expanded='false' aria-controls='collapse$updatedGroup'>
$group
$buttonText
</button>
</h5>
</div>
Expand Down

0 comments on commit 8b23b39

Please sign in to comment.