父节点
b319b190f3
当前提交
b1e4de55a2
共有 3 个文件被更改,包括 32 次插入 和 4 次删除
|
|
@ -61,6 +61,13 @@ class Stations extends CI_Model {
|
||||||
$station_active = 1;
|
$station_active = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if the state is Canada and get the correct state
|
||||||
|
if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") {
|
||||||
|
$state = $this->input->post('station_ca_state');
|
||||||
|
} else {
|
||||||
|
$state = $this->input->post('station_state');
|
||||||
|
}
|
||||||
|
|
||||||
// Create data array with field values
|
// Create data array with field values
|
||||||
$data = array(
|
$data = array(
|
||||||
'user_id' => $this->session->userdata('user_id'),
|
'user_id' => $this->session->userdata('user_id'),
|
||||||
|
|
@ -80,7 +87,7 @@ class Stations extends CI_Model {
|
||||||
'station_cnty' => xss_clean($this->input->post('station_cnty', true)),
|
'station_cnty' => xss_clean($this->input->post('station_cnty', true)),
|
||||||
'station_cq' => xss_clean($this->input->post('station_cq', true)),
|
'station_cq' => xss_clean($this->input->post('station_cq', true)),
|
||||||
'station_itu' => xss_clean($this->input->post('station_itu', true)),
|
'station_itu' => xss_clean($this->input->post('station_itu', true)),
|
||||||
'state' => xss_clean($this->input->post('station_state', true)),
|
'state' => $state,
|
||||||
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
|
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
|
||||||
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
|
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
|
||||||
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
|
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
|
||||||
|
|
@ -98,11 +105,13 @@ class Stations extends CI_Model {
|
||||||
|
|
||||||
function edit() {
|
function edit() {
|
||||||
|
|
||||||
|
// Check if the state is Canada and get the correct state
|
||||||
if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") {
|
if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") {
|
||||||
$state = $this->input->post('station_ca_state');
|
$state = $this->input->post('station_ca_state');
|
||||||
} else {
|
} else {
|
||||||
$state = $this->input->post('station_state');
|
$state = $this->input->post('station_state');
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'station_profile_name' => xss_clean($this->input->post('station_profile_name', true)),
|
'station_profile_name' => xss_clean($this->input->post('station_profile_name', true)),
|
||||||
'station_gridsquare' => xss_clean($this->input->post('gridsquare', true)),
|
'station_gridsquare' => xss_clean($this->input->post('gridsquare', true)),
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6" id="us_state">
|
||||||
<label for="stateInput">Station State</label>
|
<label for="stateInput">Station State</label>
|
||||||
<select class="form-control custom-select" name="station_state" id="StateHelp" aria-describedby="stationCntyInputHelp">
|
<select class="form-control custom-select" name="station_state" id="StateHelp" aria-describedby="stationCntyInputHelp">
|
||||||
<option value="" selected></option>
|
<option value="" selected></option>
|
||||||
|
|
@ -125,6 +125,27 @@
|
||||||
<small id="StateHelp" class="form-text text-muted">Station state. Applies to certain countries only. Leave blank if not applicable.</small>
|
<small id="StateHelp" class="form-text text-muted">Station state. Applies to certain countries only. Leave blank if not applicable.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6" id="canada_state">
|
||||||
|
<label for="stateInput">Station Canadian Province</label>
|
||||||
|
<select class="form-control custom-select" name="station_ca_state" id="StateHelp" aria-describedby="stationCntyInputHelp">
|
||||||
|
<option value="" selected></option>
|
||||||
|
<option value="AB">Alberta</option>
|
||||||
|
<option value="BC">British Columbia</option>
|
||||||
|
<option value="MB">Manitoba</option>
|
||||||
|
<option value="NB">New Brunswick</option>
|
||||||
|
<option value="NL">Newfoundland & Labrador</option>
|
||||||
|
<option value="NS">Nova Scotia</option>
|
||||||
|
<option value="NT">Northwest Territories</option>
|
||||||
|
<option value="NU">Nunavut</option>
|
||||||
|
<option value="ON">Ontario</option>
|
||||||
|
<option value="PE">Prince Edward Island</option>
|
||||||
|
<option value="QC">Quebec</option>
|
||||||
|
<option value="SK">Saskatchewan</option>
|
||||||
|
<option value="YT">Yukon</option>
|
||||||
|
</select>
|
||||||
|
<small id="StateHelp" class="form-text text-muted">Station state. Applies to certain countries only. Leave blank if not applicable.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label for="stationCntyInput">Station County</label>
|
<label for="stationCntyInput">Station County</label>
|
||||||
<input disabled="disabled" type="text" class="form-control" name="station_cnty" id="stationCntyInput" aria-describedby="stationCntyInputHelp">
|
<input disabled="disabled" type="text" class="form-control" name="station_cnty" id="stationCntyInput" aria-describedby="stationCntyInputHelp">
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ $(document).ready( function () {
|
||||||
|
|
||||||
var selectedDXCCID = $('#dxcc_select').find(":selected").val();
|
var selectedDXCCID = $('#dxcc_select').find(":selected").val();
|
||||||
|
|
||||||
console.log(selectedDXCCID);
|
|
||||||
|
|
||||||
if(selectedDXCCID == '1'){
|
if(selectedDXCCID == '1'){
|
||||||
$("#canada_state").show();
|
$("#canada_state").show();
|
||||||
$("#us_state").hide();
|
$("#us_state").hide();
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用