From 05923c7899482895f35e41ee59d69bea7f078e80 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sat, 13 Jul 2024 14:34:36 +0200 Subject: [PATCH] add the ability to log for a contest --- application/controllers/Simplefle.php | 4 +- application/views/simplefle/index.php | 81 ++++++++++++++++----------- assets/js/sections/simplefle.js | 12 ++-- 3 files changed, 54 insertions(+), 43 deletions(-) diff --git a/application/controllers/Simplefle.php b/application/controllers/Simplefle.php index 8864d2c32..d0859fcd7 100644 --- a/application/controllers/Simplefle.php +++ b/application/controllers/Simplefle.php @@ -11,7 +11,9 @@ class SimpleFLE extends CI_Controller { $this->load->model('logbook_model'); $this->load->model('modes'); $this->load->model('bands'); - + $this->load->model('contesting_model'); + + $data['contests']=$this->contesting_model->getActivecontests(); $data['station_profile'] = $this->stations->all_of_user(); // Used in the view for station location select $data['bands'] = $this->bands->get_all_bands(); // Fetching Bands for SFLE $data['modes'] = $this->modes_array(); // Fetching Modes for SFLE diff --git a/application/views/simplefle/index.php b/application/views/simplefle/index.php index 1e5df67a2..1d2040548 100644 --- a/application/views/simplefle/index.php +++ b/application/views/simplefle/index.php @@ -7,38 +7,43 @@

-
- -

- +
+
+ +

+ +
+
+

+

+
- session->flashdata('message')) { ?>
@@ -72,8 +77,15 @@
-

-

+ + +
@@ -92,7 +104,7 @@ - Station Location"); ?> + Station Location"); ?>
@@ -100,6 +112,7 @@ +
diff --git a/assets/js/sections/simplefle.js b/assets/js/sections/simplefle.js index 3b736eac3..e45ddc435 100644 --- a/assets/js/sections/simplefle.js +++ b/assets/js/sections/simplefle.js @@ -526,6 +526,7 @@ function clearSession() { $("#my-sota-wwff").val(""); $(".qso-area").val(""); $("#my-grid").val(""); + $("#contest").val(""); qsoList = []; $(".js-qso-count").html(""); } @@ -910,14 +911,6 @@ $(".js-save-to-log").click(function () { btnOKClass: "btn-info", callback: function (result) { if (result) { - var operator = $("#operator").val(); - operator = operator.toUpperCase(); - var ownCallsign = $("#stationProfile").val().toUpperCase(); - ownCallsign = ownCallsign.toUpperCase(); - // var mySotaWwff = $("#my-sota-wwff").val().toUpperCase(); - - // var myPower = $("#my-power").val(); - // var myGrid = $("#my-grid").val().toUpperCase(); qsoList.forEach((item) => { var callsign = item[2]; @@ -935,6 +928,8 @@ $(".js-save-to-log").click(function () { var mode = item[5]; var freq_display = item[3] * 1000000; var station_profile = $(".station_id").val(); + var operator = $("#operator").val().toUpperCase(); + var contest = $("#contest").val(); var sota_ref = ""; var iota_ref = ""; var pota_ref = ""; @@ -964,6 +959,7 @@ $(".js-save-to-log").click(function () { freq_display: freq_display, start_time: start_time, station_profile: station_profile, + contestname: contest, sota_ref: sota_ref, iota_ref: iota_ref, pota_ref: pota_ref,