Lock site dropdown if no locations set.

Lock site dropdown if no locations set.
This commit is contained in:
MrXermon 2024-04-05 22:28:30 +02:00 committed by GitHub
parent 4d10ef75d3
commit f6b91539c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,7 @@ $templateData['csrfToken'] = $_SESSION[LookingGlass::SESSION_CSRF] = bin2hex(ran
</a>
</div>
<div class="col-4 float-end">
<select class="form-select" onchange="window.location = this.options[this.selectedIndex].value">
<select class="form-select" onchange="window.location = this.options[this.selectedIndex].value" <?php if (count($templateData['locations']) == 0) echo 'disabled'; ?>>
<option selected><?php echo $templateData['current_location'] ?></option>
<?php foreach ($templateData['locations'] as $location => $link): ?>
<option value="<?php echo $link ?>"><?php echo $location ?></option>