mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-16 09:03:39 +00:00
Allow adding the DX grid when spotting #71
This commit is contained in:
@@ -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("/");
|
||||
|
||||
Reference in New Issue
Block a user