Now preselects active location

This commit is contained in:
Andreas
2024-01-25 11:22:25 +01:00
parent 021e205074
commit 2a1aaf82f2
2 changed files with 10 additions and 1 deletions

View File

@@ -46,6 +46,11 @@ class Logbookadvanced extends CI_Controller {
$data['options'] = $userOptions[0]->option_value;
}
$active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id);
$pageData = [];
$pageData['datePlaceholder'] = 'DD/MM/YYYY';
$pageData['deOptions'] = $deOptions;
@@ -54,6 +59,7 @@ class Logbookadvanced extends CI_Controller {
$pageData['iotaarray'] = $this->logbook_model->fetchIota();
$pageData['sats'] = $this->bands->get_worked_sats();
$pageData['station_profile'] = $this->stations->all_of_user();
$pageData['active_station_info'] = $station_profile->row();
$pageData['bands'] = $this->bands->get_worked_bands();

View File

@@ -394,7 +394,10 @@ $options = json_decode($options);
<select id="de" name="de" class="form-select form-select-sm me-2 w-auto">
<option value="All"><?php echo lang('general_word_all'); ?></option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>" >
<option value="<?php echo $station->station_id; ?>"
<?php if ($station->station_id == $this->stations->find_active()) {
echo " selected =\"selected\"";
} ?>>
<?php echo lang('gen_hamradio_callsign') . ": " ?>
<?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)
</option>