Merge pull request #1137 from AndreasK79/edit_contest_data_on_qso

[QSO Edit] Made Contest tab in QSO Edit. Added support for editing co…
这个提交包含在:
Peter Goodhall 2021-09-14 21:52:13 +01:00 提交者 GitHub
当前提交 e60bee857f
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 3 个文件被更改,包括 50 次插入13 次删除

查看文件

@ -153,6 +153,7 @@ class QSO extends CI_Controller {
$this->load->model('logbook_model');
$this->load->model('user_model');
$this->load->model('modes');
$this->load->model('contesting_model');
$this->load->library('form_validation');
@ -167,6 +168,7 @@ class QSO extends CI_Controller {
$data['dxcc'] = $this->logbook_model->fetchDxcc();
$data['iota'] = $this->logbook_model->fetchIota();
$data['modes'] = $this->modes->all();
$data['contest'] = $this->contesting_model->getActivecontests();
$this->load->view('qso/edit_ajax', $data);
}

查看文件

@ -513,6 +513,9 @@ class Logbook_model extends CI_Model {
'COL_FREQ_RX' => $this->parse_frequency($this->input->post('freq_display_rx')),
'COL_STX_STRING' => $this->input->post('stx_string'),
'COL_SRX_STRING' => $this->input->post('srx_string'),
'COL_STX' => $this->input->post('stx'),
'COL_SRX' => $this->input->post('srx'),
'COL_CONTEST_ID' => $this->input->post('contest_name'),
'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'),
'station_id' => $this->input->post('station_profile'),
'COL_OPERATOR' => $this->input->post('operator_callsign'),

查看文件

@ -42,6 +42,7 @@
<a class="nav-item nav-link" id="nav-qso-notes-tab" data-toggle="tab" href="#nav-qso-notes" role="tab" aria-controls="nav-qso-notes" aria-selected="false">Notes</a>
<a class="nav-item nav-link" id="nav-qsl-tab" data-toggle="tab" href="#nav-qsl" role="tab" aria-controls="nav-qsl" aria-selected="false">QSL</a>
<a class="nav-item nav-link" id="nav-station-tab" data-toggle="tab" href="#nav-station" role="tab" aria-controls="nav-station" aria-selected="false">Station</a>
<a class="nav-item nav-link" id="nav-contest-tab" data-toggle="tab" href="#nav-contest" role="tab" aria-controls="nav-contest" aria-selected="false">Contest</a>
</div>
</nav>
@ -191,19 +192,8 @@
</div>
</div>
<?php if ($qso->COL_STX_STRING) { ?>
<div class="form-group">
<label for="stx_string">TX Serial</label>
<input type="text" class="form-control" id="band" name="stx_string" value="<?php echo $qso->COL_STX_STRING; ?>">
</div>
<?php } ?>
<?php if ($qso->COL_SRX_STRING) { ?>
<div class="form-group">
<label for="srx_string">RX Serial</label>
<input type="text" class="form-control" id="srx_string" name="srx_string" value="<?php echo $qso->COL_SRX_STRING; ?>">
</div>
<?php } ?>
<div class="form-row">
<div class="form-group col-sm-6">
<label for="locator">Gridsquare</label>
@ -578,8 +568,50 @@
</div>
<!-- Contest Panel Contents -->
<div class="tab-pane fade" id="nav-contest" role="tabpanel" aria-labelledby="nav-contest-tab">
<div class="form-group">
<label for="contest_name">Contest Name</label>
<select class="custom-select" id="contest_name" name="contest_name">
<option value =""></option>
</div>
<?php
foreach($contest as $c) {
echo '<option value=' . $c['adifname'];
if ($qso->COL_CONTEST_ID == $c['adifname']) {
echo " selected=\"selected\"";
}
echo '>' . $c['name'] . '</option>';
}
?>
</select>
</div>
<div class="form-row">
<div class="form-group col-sm-3">
<label for="srx">Serial (R)</label>
<input type="text" id="srx" class="form-control" name="srx" value="<?php echo $qso->COL_SRX; ?>" />
</div>
<div class="form-group col-sm-3">
<label for="stx">Serial (S)</label>
<input type="text" id="stx" class="form-control" name="stx" value="<?php echo $qso->COL_STX; ?>" />
</div>
<div class="form-group col-sm-3">
<label for="srx_string">Exchange (R)</label>
<input type="text" id="srx_string" class="form-control" name="srx_string" value="<?php echo $qso->COL_SRX_STRING; ?>" />
</div>
<div class="form-group col-sm-3">
<label for="stx_string">Exchange (S)</label>
<input type="text" id="stx_string" class="form-control" name="stx_string" value="<?php echo $qso->COL_STX_STRING; ?>" />
</div>
</div>
</div>
<input type="hidden" name="id" value="<?php echo $qso->COL_PRIMARY_KEY; ?>" />