kopia lustrzana https://github.com/magicbug/Cloudlog
rodzic
b319b190f3
commit
b1e4de55a2
|
@ -61,6 +61,13 @@ class Stations extends CI_Model {
|
|||
$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
|
||||
$data = array(
|
||||
'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_cq' => xss_clean($this->input->post('station_cq', 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)),
|
||||
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
|
||||
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
|
||||
|
@ -98,11 +105,13 @@ class Stations extends CI_Model {
|
|||
|
||||
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') !="") {
|
||||
$state = $this->input->post('station_ca_state');
|
||||
} else {
|
||||
$state = $this->input->post('station_state');
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'station_profile_name' => xss_clean($this->input->post('station_profile_name', true)),
|
||||
'station_gridsquare' => xss_clean($this->input->post('gridsquare', true)),
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
|
||||
<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>
|
||||
<select class="form-control custom-select" name="station_state" id="StateHelp" aria-describedby="stationCntyInputHelp">
|
||||
<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>
|
||||
</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">
|
||||
<label for="stationCntyInput">Station County</label>
|
||||
<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();
|
||||
|
||||
console.log(selectedDXCCID);
|
||||
|
||||
if(selectedDXCCID == '1'){
|
||||
$("#canada_state").show();
|
||||
$("#us_state").hide();
|
||||
|
|
Ładowanie…
Reference in New Issue