Make the manual query parameter optional
这个提交包含在:
父节点
1083fb8693
当前提交
0faf59c7e8
共有 2 个文件被更改,包括 19 次插入 和 18 次删除
|
|
@ -1,3 +1,6 @@
|
||||||
|
<?php
|
||||||
|
$manual_time = $_GET['manual'] ?? 0;
|
||||||
|
?>
|
||||||
<div class="container qso_panel contesting">
|
<div class="container qso_panel contesting">
|
||||||
<button type="button" class="btn btn-sm btn-warning float-right" onclick="reset_contest_session()"><i class="fas fa-sync-alt"></i> <?php echo $this->lang->line('contesting_button_reset_contest_session'); ?></button>
|
<button type="button" class="btn btn-sm btn-warning float-right" onclick="reset_contest_session()"><i class="fas fa-sync-alt"></i> <?php echo $this->lang->line('contesting_button_reset_contest_session'); ?></button>
|
||||||
<h2><?php echo $this->lang->line('contesting_page_title'); ?></h2>
|
<h2><?php echo $this->lang->line('contesting_page_title'); ?></h2>
|
||||||
|
|
@ -35,15 +38,15 @@
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<label for="start_date"><?php echo $this->lang->line('general_word_date'); ?></label>
|
<label for="start_date"><?php echo $this->lang->line('general_word_date'); ?></label>
|
||||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
|
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($manual_time == 0 ? "disabled" : ""); ?> >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-1">
|
<div class="form-group col-md-1">
|
||||||
<label for="start_time"><?php echo $this->lang->line('general_word_time'); ?></label>
|
<label for="start_time"><?php echo $this->lang->line('general_word_time'); ?></label>
|
||||||
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_time'); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
|
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_time'); } else {echo date('H:i'); } ?>" size="7" <?php echo ($manual_time == 0 ? "disabled" : ""); ?> >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ( $_GET['manual'] == 0 ) { ?>
|
<?php if ( $manual_time == 0 ) { ?>
|
||||||
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
|
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
|
||||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
@ -132,7 +135,7 @@
|
||||||
<label for="exch_serial_s">Serial (S)</label>
|
<label for="exch_serial_s">Serial (S)</label>
|
||||||
<input type="number" class="form-control form-control-sm" name="exch_serial_s" id="exch_serial_s" value="">
|
<input type="number" class="form-control form-control-sm" name="exch_serial_s" id="exch_serial_s" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display:none" class="form-group col-md-1 exchanges">
|
<div style="display:none" class="form-group col-md-1 exchanges">
|
||||||
<label for="exch_sent"><?php echo $this->lang->line('gen_hamradio_exchange_sent_short'); ?></label>
|
<label for="exch_sent"><?php echo $this->lang->line('gen_hamradio_exchange_sent_short'); ?></label>
|
||||||
<input type="text" class="form-control form-control-sm" name="exch_sent" id="exch_sent" value="">
|
<input type="text" class="form-control form-control-sm" name="exch_sent" id="exch_sent" value="">
|
||||||
|
|
@ -152,7 +155,7 @@
|
||||||
<label for="exch_serial_r">Serial (R)</label>
|
<label for="exch_serial_r">Serial (R)</label>
|
||||||
<input type="number" class="form-control form-control-sm" name="exch_serial_r" id="exch_serial_r" value="">
|
<input type="number" class="form-control form-control-sm" name="exch_serial_r" id="exch_serial_r" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display:none" class="form-group col-md-1 exchanger">
|
<div style="display:none" class="form-group col-md-1 exchanger">
|
||||||
<label for="exch_recv"><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></label>
|
<label for="exch_recv"><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></label>
|
||||||
<input type="text" class="form-control form-control-sm" name="exch_recv" id="exch_recv" value="">
|
<input type="text" class="form-control form-control-sm" name="exch_recv" id="exch_recv" value="">
|
||||||
|
|
@ -228,5 +231,3 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
?>
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ function load_was_map() {
|
||||||
console.log("'clicked");
|
console.log("'clicked");
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
navigator.geolocation.getCurrentPosition(showPosition);
|
navigator.geolocation.getCurrentPosition(showPosition);
|
||||||
} else {
|
} else {
|
||||||
console.log('Geolocation is not supported by this browser.');
|
console.log('Geolocation is not supported by this browser.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -280,7 +280,7 @@ function load_was_map() {
|
||||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>The stored query has been deleted!</div>');
|
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>The stored query has been deleted!</div>');
|
||||||
$("#query_" + id).remove(); // removes query from table in dialog
|
$("#query_" + id).remove(); // removes query from table in dialog
|
||||||
$("#querydropdown option[value='" + id + "']").remove(); // removes query from dropdown
|
$("#querydropdown option[value='" + id + "']").remove(); // removes query from dropdown
|
||||||
if ($("#querydropdown option").length == 0) {
|
if ($("#querydropdown option").length == 0) {
|
||||||
$("#btn-edit").remove();
|
$("#btn-edit").remove();
|
||||||
$('.querydropdownform').remove();
|
$('.querydropdownform').remove();
|
||||||
};
|
};
|
||||||
|
|
@ -492,13 +492,13 @@ function calculateQrb() {
|
||||||
data: {'locator1': locator1,
|
data: {'locator1': locator1,
|
||||||
'locator2': locator2},
|
'locator2': locator2},
|
||||||
success: function (html) {
|
success: function (html) {
|
||||||
|
|
||||||
var result = "<h5>Negative latitudes are south of the equator, negative longitudes are west of Greenwich. <br/>";
|
var result = "<h5>Negative latitudes are south of the equator, negative longitudes are west of Greenwich. <br/>";
|
||||||
result += ' ' + locator1.toUpperCase() + ' Latitude = ' + html['latlng1'][0] + ' Longitude = ' + html['latlng1'][1] + '<br/>';
|
result += ' ' + locator1.toUpperCase() + ' Latitude = ' + html['latlng1'][0] + ' Longitude = ' + html['latlng1'][1] + '<br/>';
|
||||||
result += ' ' + locator2.toUpperCase() + ' Latitude = ' + html['latlng2'][0] + ' Longitude = ' + html['latlng2'][1] + '<br/>';
|
result += ' ' + locator2.toUpperCase() + ' Latitude = ' + html['latlng2'][0] + ' Longitude = ' + html['latlng2'][1] + '<br/>';
|
||||||
result += 'Distance between ' + locator1.toUpperCase() + ' and ' + locator2.toUpperCase() + ' is ' + html['distance'] + '.<br />';
|
result += 'Distance between ' + locator1.toUpperCase() + ' and ' + locator2.toUpperCase() + ' is ' + html['distance'] + '.<br />';
|
||||||
result += 'The bearing is ' + html['bearing'] + '.</h5>';
|
result += 'The bearing is ' + html['bearing'] + '.</h5>';
|
||||||
|
|
||||||
$(".qrbResult").html(result);
|
$(".qrbResult").html(result);
|
||||||
newpath(html['latlng1'], html['latlng2'], locator1, locator2);
|
newpath(html['latlng1'], html['latlng2'], locator1, locator2);
|
||||||
}
|
}
|
||||||
|
|
@ -512,7 +512,7 @@ function validateLocator(locator) {
|
||||||
if(locator.length < 4 && !(/^[a-rA-R]{2}[0-9]{2}[a-xA-X]{0,2}[0-9]{0,2}[a-xA-X]{0,2}$/.test(locator))) {
|
if(locator.length < 4 && !(/^[a-rA-R]{2}[0-9]{2}[a-xA-X]{0,2}[0-9]{0,2}[a-xA-X]{0,2}$/.test(locator))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -530,7 +530,7 @@ function newpath(latlng1, latlng2, locator1, locator2) {
|
||||||
|
|
||||||
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||||
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
|
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
|
||||||
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib});
|
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib});
|
||||||
|
|
||||||
var redIcon = L.icon({
|
var redIcon = L.icon({
|
||||||
iconUrl: icon_dot_url,
|
iconUrl: icon_dot_url,
|
||||||
|
|
@ -837,7 +837,7 @@ $(document).on('keypress',function(e) {
|
||||||
<?php if ($this->uri->segment(1) == "qso") { ?>
|
<?php if ($this->uri->segment(1) == "qso") { ?>
|
||||||
<script src="<?php echo base_url() ;?>assets/js/sections/qso.js"></script>
|
<script src="<?php echo base_url() ;?>assets/js/sections/qso.js"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$this->load->model('stations');
|
$this->load->model('stations');
|
||||||
$active_station_id = $this->stations->find_active();
|
$active_station_id = $this->stations->find_active();
|
||||||
|
|
@ -879,7 +879,7 @@ $(document).on('keypress',function(e) {
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var manual = <?php echo $_GET['manual']; ?>;
|
var manual = <?php echo $_GET['manual'] ?? 0; ?>;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
@ -1058,7 +1058,7 @@ $(document).on('keypress',function(e) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( ($this->uri->segment(1) == "qso" && $_GET['manual'] == 0) || ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add")) { ?>
|
<?php if ( ($this->uri->segment(1) == "qso" && $_GET['manual'] ?? 0 == 0) || ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add")) { ?>
|
||||||
<script>
|
<script>
|
||||||
function setRst(mode) {
|
function setRst(mode) {
|
||||||
if(mode == 'JT65' || mode == 'JT65B' || mode == 'JT6C' || mode == 'JTMS' || mode == 'ISCAT' || mode == 'MSK144' || mode == 'JTMSK' || mode == 'QRA64' || mode == 'FT8' || mode == 'FT4' || mode == 'JS8' || mode == 'JT9' || mode == 'JT9-1' || mode == 'ROS'){
|
if(mode == 'JT65' || mode == 'JT65B' || mode == 'JT6C' || mode == 'JTMS' || mode == 'ISCAT' || mode == 'MSK144' || mode == 'JTMSK' || mode == 'QRA64' || mode == 'FT8' || mode == 'FT4' || mode == 'JS8' || mode == 'JT9' || mode == 'JT9-1' || mode == 'ROS'){
|
||||||
|
|
@ -1518,7 +1518,7 @@ $(document).ready(function(){
|
||||||
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright');?>',
|
attribution: '<?php echo $this->optionslib->get_option('option_map_tile_server_copyright');?>',
|
||||||
}).addTo(mymap);
|
}).addTo(mymap);
|
||||||
|
|
||||||
|
|
||||||
var printer = L.easyPrint({
|
var printer = L.easyPrint({
|
||||||
tileLayer: tiles,
|
tileLayer: tiles,
|
||||||
sizeModes: ['Current'],
|
sizeModes: ['Current'],
|
||||||
|
|
@ -2425,7 +2425,7 @@ function deleteQsl(id) {
|
||||||
</script>
|
</script>
|
||||||
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add" ) { ?>
|
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add" ) { ?>
|
||||||
<script>
|
<script>
|
||||||
var manual = <?php echo $_GET['manual']; ?>;
|
var manual = <?php echo $_GET['manual'] ?? 0; ?>;
|
||||||
</script>
|
</script>
|
||||||
<script src="<?php echo base_url() ;?>assets/js/sections/contesting.js?v2"></script>
|
<script src="<?php echo base_url() ;?>assets/js/sections/contesting.js?v2"></script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用