Added IOTA-dropdown in QSO entry

This commit is contained in:
AndreasK79 2020-04-13 14:37:09 +02:00
parent db2cd61b35
commit e974260913
3 changed files with 20 additions and 1 deletions

View File

@ -24,6 +24,7 @@ class QSO extends CI_Controller {
$data['radios'] = $this->cat->radios();
$data['query'] = $this->logbook_model->last_custom('5');
$data['dxcc'] = $this->logbook_model->fetchDxcc();
$data['iota'] = $this->logbook_model->fetchIota();
$this->load->library('form_validation');

View File

@ -1820,6 +1820,15 @@ class Logbook_model extends CI_Model {
return $query->result();
}
function fetchIota() {
$sql = "select tag, name from iota";
$sql .= ' order by tag';
$query = $this->db->query($sql);
return $query->result();
}
}

View File

@ -298,7 +298,16 @@
<div class="form-group">
<label for="iota_ref">IOTA Reference</label>
<input class="form-control" id="iota_ref" type="text" name="iota_ref" value="" /> e.g: EU-005
<select class="form-control" id="iota_Ref" name="iota_ref">
<option value =""></option>
<?php
foreach($iota as $i){
echo '<option value=' . $i->tag . '>' . $i->tag . ' - ' . $i->name . '</option>';
}
?>
</select>
</div>
<div class="form-group">