Added all modes in edit mode...

这个提交包含在:
Kim Huebel 2020-05-17 15:08:21 +02:00
父节点 8f1dcf3db6
当前提交 ece34b756a
共有 2 个文件被更改,包括 7 次插入6 次删除

查看文件

@ -102,6 +102,7 @@ class QSO extends CI_Controller {
$this->load->model('logbook_model'); $this->load->model('logbook_model');
$this->load->model('user_model'); $this->load->model('user_model');
$this->load->model('modes');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$query = $this->logbook_model->qso_info($this->uri->segment(3)); $query = $this->logbook_model->qso_info($this->uri->segment(3));
@ -114,6 +115,7 @@ class QSO extends CI_Controller {
$data['qso'] = $query->row(); $data['qso'] = $query->row();
$data['dxcc'] = $this->logbook_model->fetchDxcc(); $data['dxcc'] = $this->logbook_model->fetchDxcc();
$data['iota'] = $this->logbook_model->fetchIota(); $data['iota'] = $this->logbook_model->fetchIota();
$data['modes'] = $this->modes->all();
if ($this->form_validation->run() == FALSE) if ($this->form_validation->run() == FALSE)
{ {

查看文件

@ -70,12 +70,11 @@
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<label for="freq">Mode</label> <label for="freq">Mode</label>
<select id="mode" class="form-control mode form-control-sm" name="mode"> <select id="mode" class="form-control mode form-control-sm" name="mode">
<?php <?php
$this->load->library('frequency'); foreach($modes->result() as $mode){
foreach(Frequency::modes as $mode){ printf("<option value=\"%s\" %s>%s</option>", $mode->mode, $this->session->userdata('mode')==$mode->mode?"selected=\"selected\"":"",$mode->mode);
printf("<option value=\"%s\" %s>%s</option>", $mode, $qso->COL_MODE==$mode?"selected=\"selected\"":"",$mode); }
} ?>
?>
</select> </select>
</div> </div>