diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 91c215488..51d10943b 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -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)); diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 06f7ca908..cc3bbadd6 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -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');