mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Don't use grid from callbook if probably wrong upon logging
This commit is contained in:
@@ -159,6 +159,7 @@ class Logbook extends CI_Controller {
|
||||
|
||||
$return['callsign_name'] = $this->nval($callbook['name'] ?? '', $this->logbook_model->call_name($callsign));
|
||||
$return['callsign_qra'] = $this->nval($callbook['gridsquare'] ?? '', $this->logbook_model->call_qra($callsign));
|
||||
$return['callsign_geoloc'] = $callbook['geoloc'] ?? '';
|
||||
$return['callsign_distance'] = $this->distance($return['callsign_qra'], $station_id);
|
||||
$return['callsign_qth'] = $this->nval($callbook['city'] ?? '', $this->logbook_model->call_qth($callsign));
|
||||
$return['callsign_iota'] = $this->nval($callbook['iota'] ?? '', $this->logbook_model->call_iota($callsign));
|
||||
|
||||
@@ -1128,14 +1128,16 @@ $("#callsign").on("focusout", function () {
|
||||
|
||||
/* Find Locator if the field is empty */
|
||||
if ($('#locator').val() == "") {
|
||||
$('#locator').val(result.callsign_qra);
|
||||
$('#locator_info').html(result.bearing);
|
||||
if (result.callsign_geoloc != 'grid') {
|
||||
$('#locator').val(result.callsign_qra);
|
||||
$('#locator_info').html(result.bearing);
|
||||
}
|
||||
|
||||
if (result.callsign_distance != "" && result.callsign_distance != 0) {
|
||||
document.getElementById("distance").value = result.callsign_distance;
|
||||
}
|
||||
|
||||
if (result.callsign_qra != "") {
|
||||
if (result.callsign_qra != "" && result.callsign_geoloc != 'grid') {
|
||||
if (result.confirmed) {
|
||||
$('#locator').addClass("confirmedGrid");
|
||||
$('#locator').attr('title', 'Grid was already worked and confirmed in the past');
|
||||
|
||||
Reference in New Issue
Block a user