diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 801fafc0..c5dc1e6e 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -103,6 +103,7 @@ class Logbook extends CI_Controller { // Convert - in Callsign to / Used for URL processing $callsign = str_replace("-","/",$callsign); + $callsign = str_replace("Ø","0",$callsign); // Check if callsign is an LoTW User // Check Database for all other data diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 6d10cc00..87e8b245 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -506,9 +506,10 @@ $("#callsign").focusout(function() { var find_callsign = $(this).val().toUpperCase(); find_callsign.replace(/\//g, "-"); + find_callsign.replace('Ø', '0'); // Replace / in a callsign with - to stop urls breaking - $.getJSON(base_url + 'index.php/logbook/json/' + find_callsign.replace(/\//g, "-") + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result) + $.getJSON(base_url + 'index.php/logbook/json/' + find_callsign + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), function(result) { // Make sure the typed callsign and json result match @@ -521,9 +522,12 @@ $("#callsign").focusout(function() { $('#country').val(convert_case(result.dxcc.entity)); $('#callsign_info').text(convert_case(result.dxcc.entity)); + var callsign = find_callsign.replace(/\//g, "-"); + callsign = callsign.replace('Ø', '0'); + if($("#sat_name" ).val() != "") { //logbook/jsonlookupgrid/io77/SAT/0/0 - $.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign.replace(/\//g, "-") + '/SAT/0/0', function(result) + $.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign + '/SAT/0/0', function(result) { // Reset CSS values before updating $('#callsign').removeClass("workedGrid"); @@ -545,7 +549,7 @@ $("#callsign").focusout(function() { } }) } else { - $.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign.replace(/\//g, "-") + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result) + $.getJSON(base_url + 'index.php/logbook/jsonlookupcallsign/' + find_callsign + '/0/' + $("#band").val() +'/' + $("#mode").val(), function(result) { // Reset CSS values before updating $('#callsign').removeClass("confirmedGrid"); @@ -940,11 +944,12 @@ $("#callsign").on("keypress", function(e) { $("#callsign").keyup(function() { if ($(this).val().length >= 3) { $('.callsign-suggest').show(); + $callsign = $(this).val().replace('Ø', '0'); $.ajax({ url: 'lookup/scp', method: 'POST', data: { - callsign: $(this).val().toUpperCase() + callsign: $callsign.toUpperCase() }, success: function(result) { $('.callsign-suggestions').text(result);