Allow adding the DX grid when spotting #71

This commit is contained in:
Ian Renton
2025-11-01 11:11:33 +00:00
parent 57d950c1ca
commit 471c487132
3 changed files with 21 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ function addSpot() {
var dx = $("#dx-call").val().toUpperCase();
var freqStr = $("#freq").val();
var mode = $("#mode").val().toUpperCase();
var dxGrid = $("#dx-grid").val();
var comment = $("#comment").val();
var de = $("#de-call").val().toUpperCase();
@@ -27,11 +28,17 @@ function addSpot() {
if (mode != "") {
spot["mode"] = mode;
}
if (dxGrid != "") {
spot["dx_grid"] = dxGrid;
}
if (comment != "") {
spot["comment"] = comment;
}
if (de != "") {
spot["de_call"] = de;
} else {
showAddSpotError("A spotter callsign is required in order to spot.");
return;
}
spot["time"] = moment.utc().valueOf() / 1000.0;
@@ -42,6 +49,7 @@ function addSpot() {
timeout: 10000,
success: async function (result) {
$("#result-good").html("<button type='button' class='btn btn-success' style='margin-top: 2em;'><i class='fa-solid fa-check'></i> OK</button>");
$("#result-bad").html("");
setTimeout(() => {
$("#result-good").hide();
window.location.replace("/");