[DXCC Award] Adding mode to selection
这个提交包含在:
父节点
be6550723c
当前提交
44909aec5d
共有 2 个文件被更改,包括 30 次插入 和 5 次删除
|
|
@ -75,7 +75,10 @@ class Awards extends CI_Controller {
|
|||
|
||||
public function dxcc () {
|
||||
$this->load->model('dxcc');
|
||||
$this->load->model('modes');
|
||||
|
||||
$data['worked_bands'] = $this->dxcc->get_worked_bands(); // Used in the view for band select
|
||||
$data['modes'] = $this->modes->active(); // Used in the view for mode select
|
||||
|
||||
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
|
||||
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
|
||||
|
|
@ -106,6 +109,7 @@ class Awards extends CI_Controller {
|
|||
$postdata['Oceania'] = $this->input->post('Oceania');
|
||||
$postdata['Antarctica'] = $this->input->post('Antarctica');
|
||||
$postdata['band'] = $this->input->post('band');
|
||||
$postdata['mode'] = $this->input->post('mode');
|
||||
}
|
||||
else { // Setting default values at first load of page
|
||||
$postdata['lotw'] = 1;
|
||||
|
|
@ -122,6 +126,7 @@ class Awards extends CI_Controller {
|
|||
$postdata['Oceania'] = 1;
|
||||
$postdata['Antarctica'] = 1;
|
||||
$postdata['band'] = 'All';
|
||||
$postdata['mode'] = 'All';
|
||||
}
|
||||
|
||||
$dxcclist = $this->dxcc->fetchdxcc($postdata);
|
||||
|
|
|
|||
|
|
@ -82,11 +82,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select Basic -->
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="band">Band</label>
|
||||
<div class="col-md-2">
|
||||
<select id="band2" name="band" class="form-control">
|
||||
<select id="band2" name="band" class="form-control custom-select-sm">
|
||||
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?> >Every band</option>
|
||||
<?php foreach($worked_bands as $band) {
|
||||
echo '<option value="' . $band . '"';
|
||||
|
|
@ -97,12 +96,33 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button (Double) -->
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="mode">Mode</label>
|
||||
<div class="col-md-2">
|
||||
<select id="mode" name="mode" class="form-control custom-select-sm">
|
||||
<option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'mode') echo ' selected'; ?>>All</option>
|
||||
<?php
|
||||
foreach($modes->result() as $mode){
|
||||
if ($mode->submode == null) {
|
||||
echo '<option value="' . $mode->mode . '"';
|
||||
if ($this->input->post('mode') == $mode->mode) echo ' selected';
|
||||
echo '>'. $mode->mode . '</option>'."\n";
|
||||
} else {
|
||||
echo '<option value="' . $mode->submode . '"';
|
||||
if ($this->input->post('mode') == $mode->submode) echo ' selected';
|
||||
echo '>' . $mode->submode . '</option>'."\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="button1id"></label>
|
||||
<div class="col-md-10">
|
||||
<button id="button2id" type="reset" name="button2id" class="btn btn-warning">Reset</button>
|
||||
<button id="button1id" type="submit" name="button1id" class="btn btn-primary">Show</button>
|
||||
<button id="button2id" type="reset" name="button2id" class="btn-sm btn-warning">Reset</button>
|
||||
<button id="button1id" type="submit" name="button1id" class="btn-sm btn-primary">Show</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
正在加载…
在新工单中引用