Merge pull request #1570 from phl0/hideLinkedStationProfiles

Hide already linked station profiles
pull/1580/head
Peter Goodhall 2022-08-24 16:01:37 +01:00 zatwierdzone przez GitHub
commit 97c0e622cc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -77,11 +77,22 @@
<form method="post" action="<?php echo site_url('logbooks/edit/'); ?><?php echo $station_logbook_details->logbook_id; ?>" name="create_profile">
<input type="hidden" name="logbook_id" value="<?php echo $station_logbook_details->logbook_id; ?>">
<?php
$linked_stations = array();
if ($station_locations_linked) {
foreach ($station_locations_linked->result() as $row) {
$linked_stations[] = $row->station_id;
}
}
?>
<div class="form-group">
<label for="StationLocationsSelect">Select Available Station Locations</label>
<select name="SelectedStationLocation" class="form-control" id="StationLocationSelect" aria-describedby="StationLocationSelectHelp">
<?php foreach ($station_locations_list->result() as $row) { ?>
<?php foreach ($station_locations_list->result() as $row) {
if (!in_array($row->station_id, $linked_stations)) { ?>
<option value="<?php echo $row->station_id;?>"><?php echo $row->station_profile_name;?> (Callsign: <?php echo $row->station_callsign;?> DXCC: <?php echo $row->station_country;?>)</option>
<?php } ?>
<?php } ?>
</select>
</div>