[WAB] Added ability to store WAB reference in Station Locations
Added ability to store WAB reference in Station Locations and also its exported in ADIF with the custom tag of "APP_CLOUDLOG_MY_WAB"
这个提交包含在:
父节点
62a83c6072
当前提交
c6716ab57a
共有 7 个文件被更改,包括 449 次插入 和 378 次删除
|
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
|||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 182;
|
||||
$config['migration_version'] = 183;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ class AdifHelper {
|
|||
$line .= $this->getAdifFieldLine("MY_POTA_REF", $qso->station_pota);
|
||||
|
||||
$line .= $this->getAdifFieldLine("MY_CQ_ZONE", $qso->station_cq);
|
||||
|
||||
$line .= $this->getAdifFieldLine("APP_CLOUDLOG_MY_WAB", $qso->station_wab);
|
||||
$line .= $this->getAdifFieldLine("MY_ITU_ZONE", $qso->station_itu);
|
||||
|
||||
if($qso->state) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Add WAB Field to Station Location
|
||||
*/
|
||||
|
||||
class Migration_add_wab_to_location extends CI_Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('station_wab', 'station_profile')) {
|
||||
// Add WAB Ref to station profile
|
||||
$fields = array(
|
||||
'station_wab varchar(10) DEFAULT NULL',
|
||||
);
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('station_wab', 'station_profile')) {
|
||||
$this->dbforge->drop_column('station_profile', 'station_wab');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -91,6 +91,7 @@ class Stations extends CI_Model {
|
|||
'station_sota' => xss_clean(strtoupper($this->input->post('sota', true))),
|
||||
'station_wwff' => xss_clean(strtoupper($this->input->post('wwff', true))),
|
||||
'station_pota' => xss_clean(strtoupper($this->input->post('pota', true))),
|
||||
'station_wab' => xss_clean(strtoupper($this->input->post('wab', true))),
|
||||
'station_sig' => xss_clean(strtoupper($this->input->post('sig', true))),
|
||||
'station_sig_info' => xss_clean(strtoupper($this->input->post('sig_info', true))),
|
||||
'station_callsign' => xss_clean($this->input->post('station_callsign', true)),
|
||||
|
|
@ -141,6 +142,7 @@ class Stations extends CI_Model {
|
|||
'station_sota' => xss_clean($this->input->post('sota', true)),
|
||||
'station_wwff' => xss_clean($this->input->post('wwff', true)),
|
||||
'station_pota' => xss_clean($this->input->post('pota', true)),
|
||||
'station_wab' => xss_clean($this->input->post('wab', true)),
|
||||
'station_sig' => xss_clean($this->input->post('sig', true)),
|
||||
'station_sig_info' => xss_clean($this->input->post('sig_info', true)),
|
||||
'station_callsign' => xss_clean($this->input->post('station_callsign', true)),
|
||||
|
|
|
|||
|
|
@ -1628,17 +1628,19 @@ if ($this->session->userdata('user_id') != null) {
|
|||
}).addTo(map);
|
||||
|
||||
/*Legend specific*/
|
||||
var legend = L.control({ position: "topright" });
|
||||
var legend = L.control({
|
||||
position: "topright"
|
||||
});
|
||||
|
||||
legend.onAdd = function(map) {
|
||||
legend.onAdd = function(map) {
|
||||
var div = L.DomUtil.create("div", "legend");
|
||||
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
|
||||
div.innerHTML += "<i style='background: green'></i><span> Confirmed Square</span><br>";
|
||||
div.innerHTML += "<i style='background: orange'></i><span> Unconfirmed Square</span><br>";
|
||||
return div;
|
||||
};
|
||||
};
|
||||
|
||||
legend.addTo(map);
|
||||
legend.addTo(map);
|
||||
|
||||
//console.log(wab_squares.responseJSON);
|
||||
// Add requested external GeoJSON to map
|
||||
|
|
@ -3109,6 +3111,25 @@ legend.addTo(map);
|
|||
<script>
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
|
||||
$(document).ready(function() {
|
||||
function checkSelectedValue() {
|
||||
var selectedValue = $('#dxcc_select').val();
|
||||
var valuesToShow = [223, 279, 294, 265, 106, 122];
|
||||
|
||||
if (valuesToShow.includes(Number(selectedValue))) {
|
||||
$('#WABbox').show();
|
||||
} else {
|
||||
$('#WABbox').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// Call on page load
|
||||
checkSelectedValue();
|
||||
|
||||
// Call on change event
|
||||
$('#dxcc_select').change(checkSelectedValue);
|
||||
});
|
||||
|
||||
var state = $("#StateHelp option:selected").text();
|
||||
if (state != "") {
|
||||
$("#stationCntyInput").prop('disabled', false);
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
|
||||
<div class="container" id="create_station_profile">
|
||||
|
||||
<br>
|
||||
<?php if($this->session->flashdata('message')) { ?>
|
||||
<br>
|
||||
<?php if ($this->session->flashdata('message')) { ?>
|
||||
<!-- Display Message -->
|
||||
<div class="alert-message error">
|
||||
<p><?php echo $this->session->flashdata('message'); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<?php echo $page_title; ?>
|
||||
</div>
|
||||
|
|
@ -17,8 +16,8 @@
|
|||
<h5 class="card-title"></h5>
|
||||
<p class="card-text"></p>
|
||||
|
||||
<?php if($this->session->flashdata('notice')) { ?>
|
||||
<div id="message" >
|
||||
<?php if ($this->session->flashdata('notice')) { ?>
|
||||
<div id="message">
|
||||
<?php echo $this->session->flashdata('notice'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
@ -65,7 +64,8 @@
|
|||
<select class="form-select" id="dxcc_select" name="dxcc" aria-describedby="stationCallsignInputHelp">
|
||||
<option value="0" selected><?php echo "- " . lang('general_word_none') . " -"; ?></option>
|
||||
<?php foreach ($dxcc_list->result() as $dxcc) { ?>
|
||||
<option value="<?php echo $dxcc->adif; ?>"><?php echo ucwords(strtolower($dxcc->name)) . ' - ' . $dxcc->prefix; if ($dxcc->end != NULL) echo ' ('.lang('gen_hamradio_deleted_dxcc').')';?>
|
||||
<option value="<?php echo $dxcc->adif; ?>"><?php echo ucwords(strtolower($dxcc->name)) . ' - ' . $dxcc->prefix;
|
||||
if ($dxcc->end != NULL) echo ' (' . lang('gen_hamradio_deleted_dxcc') . ')'; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
|
@ -172,28 +172,28 @@
|
|||
<label for="stationCQZoneInput"><?php echo lang("gen_hamradio_cq_zone"); ?></label>
|
||||
<select class="form-select" id="stationCQZoneInput" name="station_cq" required>
|
||||
<?php
|
||||
for ($i = 1; $i<=40; $i++) {
|
||||
echo '<option value='. $i;
|
||||
for ($i = 1; $i <= 40; $i++) {
|
||||
echo '<option value=' . $i;
|
||||
|
||||
echo '>'. $i .'</option>';
|
||||
echo '>' . $i . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<small id="stationCQInputHelp" class="form-text text-muted"><?php echo lang("gen_find_zone_cq_part1")." <a href='https://zone-check.eu/?m=cq' target='_blank'>".lang("gen_find_zone_part2")."</a> ".lang("gen_find_zone_part3"); ?></small>
|
||||
<small id="stationCQInputHelp" class="form-text text-muted"><?php echo lang("gen_find_zone_cq_part1") . " <a href='https://zone-check.eu/?m=cq' target='_blank'>" . lang("gen_find_zone_part2") . "</a> " . lang("gen_find_zone_part3"); ?></small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-sm-6">
|
||||
<label for="stationITUZoneInput"><?php echo lang("gen_hamradio_itu_zone"); ?></label>
|
||||
<select class="form-select" id="stationITUZoneInput" name="station_itu" required>
|
||||
<?php
|
||||
for ($i = 1; $i<=90; $i++) {
|
||||
echo '<option value='. $i;
|
||||
for ($i = 1; $i <= 90; $i++) {
|
||||
echo '<option value=' . $i;
|
||||
|
||||
echo '>'. $i .'</option>';
|
||||
echo '>' . $i . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<small id="stationITUInputHelp" class="form-text text-muted"><?php echo lang("gen_find_zone_itu_part1")." <a href='https://zone-check.eu/?m=itu' target='_blank'>".lang("gen_find_zone_part2")."</a> ".lang("gen_find_zone_part3"); ?></small>
|
||||
<small id="stationITUInputHelp" class="form-text text-muted"><?php echo lang("gen_find_zone_itu_part1") . " <a href='https://zone-check.eu/?m=itu' target='_blank'>" . lang("gen_find_zone_part2") . "</a> " . lang("gen_find_zone_part3"); ?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -214,10 +214,10 @@
|
|||
<div class="mb-3">
|
||||
<label for="stationIOTAInput"><?php echo lang("gen_hamradio_iota_reference"); ?></label>
|
||||
<select class="form-select" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005">
|
||||
<option value =""></option>
|
||||
<option value=""></option>
|
||||
|
||||
<?php
|
||||
foreach($iota_list as $i){
|
||||
foreach ($iota_list as $i) {
|
||||
echo '<option value=' . $i->tag . '>' . $i->tag . ' - ' . $i->name . '</option>';
|
||||
}
|
||||
?>
|
||||
|
|
@ -245,6 +245,12 @@
|
|||
<small id="stationPOTAInputHelp" class="form-text text-muted"><?php echo lang("station_location_pota_hint_ln1"); ?></small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3" id="WABbox">
|
||||
<label for="stationWABInput">Worked All Britain Reference</label>
|
||||
<input type="text" class="form-control" name="wab" id="stationWABInput" aria-describedby="stationWABInputHelp">
|
||||
<small id="stationWABInputHelp" class="form-text text-muted">Enter your WAB Square, if you dont know it use <a href="https://www.whatsmylocator.co.uk/" target="_blank">WhatsMyLocator</a></small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="stationSigInput"><?php echo lang("station_location_signature"); ?></label>
|
||||
<input type="text" class="form-control" name="sig" id="stationSigInput" aria-describedby="stationSigInputHelp">
|
||||
|
|
@ -357,8 +363,8 @@
|
|||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
</div>
|
||||
|
|
@ -319,6 +319,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md" id="WABbox">
|
||||
<div class="card">
|
||||
<h5 class="card-header">Worked All Britain Reference</h5>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="stationWABInput">WAB Reference Number</label>
|
||||
<input type="text" class="form-control" name="wab" id="stationWABInput" aria-describedby="stationWABInputHelp" value="<?php if(set_value('wab') != "") { echo set_value('wab'); } else { echo $my_station_profile->station_wab; } ?>">
|
||||
<small id="stationWABInputHelp" class="form-text text-muted">Enter your WAB Square, if you dont know it use <a href="https://www.whatsmylocator.co.uk/" target="_blank">WhatsMyLocator</a></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
|
|||
正在加载…
在新工单中引用