Added an IOTA-dropdown in edit/create station profile. We have the table with IOTA, so I added a dropdown to make it a bit more user-friendly.

pull/646/head
Andreas 2020-10-06 23:47:39 +02:00
rodzic 44eee371d6
commit d38aa6eb51
3 zmienionych plików z 38 dodań i 10 usunięć

Wyświetl plik

@ -37,6 +37,9 @@ class Station extends CI_Controller {
$this->load->model('dxcc');
$data['dxcc_list'] = $this->dxcc->list();
$this->load->model('logbook_model');
$data['iota_list'] = $this->logbook_model->fetchIota();
$this->load->library('form_validation');
$this->form_validation->set_rules('station_profile_name', 'Station Profile Name', 'required');
@ -62,6 +65,9 @@ class Station extends CI_Controller {
$this->load->model('stations');
$this->load->model('dxcc');
$this->load->model('logbook_model');
$data['iota_list'] = $this->logbook_model->fetchIota();
$item_id_clean = $this->security->xss_clean($id);

Wyświetl plik

@ -159,11 +159,20 @@
<small id="stationGridInputHelp" class="form-text text-muted">Station Gridsquare for example IO87IP, if you are at a gridline enter the gridsquare with a comma for example IO77,IO78,IO87,IO88.</small>
</div>
<div class="form-group">
<label for="stationIOTAInput">IOTA Reference</label>
<input type="text" class="form-control" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005">
<small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small>
</div>
<div class="form-group">
<label for="stationIOTAInput">IOTA Reference</label>
<select class="custom-select" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005">
<option value =""></option>
<?php
foreach($iota_list as $i){
echo '<option value=' . $i->tag . '>' . $i->tag . ' - ' . $i->name . '</option>';
}
?>
</select>
<small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small>
</div>
<div class="form-group">
<label for="stationSOTAInput">SOTA Reference</label>

Wyświetl plik

@ -177,11 +177,24 @@
<small id="stationGridInputHelp" class="form-text text-muted">Station Gridsquare for example IO87IP, if you are at a gridline enter the gridsquare with a comma for example IO77,IO78,IO87,IO88.</small>
</div>
<div class="form-group">
<label for="stationIOTAInput">IOTA Reference</label>
<input type="text" class="form-control" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" value="<?php if(set_value('iota') != "") { echo set_value('iota'); } else { echo $my_station_profile->station_iota; } ?>">
<small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small>
</div>
<div class="form-group">
<label for="stationIOTAInput">IOTA Reference</label>
<select class="custom-select" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005">
<option value =""></option>
<?php
foreach($iota_list as $i){
echo '<option value=' . $i->tag;
if ($my_station_profile->station_iota == $i->tag) {
echo " selected =\"selected\"";
}
echo '>' . $i->tag . ' - ' . $i->name . '</option>';
}
?>
</select>
<small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small>
</div>
<div class="form-group">
<label for="stationSOTAInput">SOTA Reference</label>