From 14b67ce72030f2e6b32888e12a4b79aaed8d1b2f Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 08:48:42 +0200 Subject: [PATCH 01/16] Unmark unsupported LoTW uploads for INTERNET and RPT QSOs --- application/config/migration.php | 2 +- .../209_unmark_unsupported_lotw_uploads.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 application/migrations/209_unmark_unsupported_lotw_uploads.php diff --git a/application/config/migration.php b/application/config/migration.php index d18693070..1bbb1a0a6 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 208; +$config['migration_version'] = 209; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/209_unmark_unsupported_lotw_uploads.php b/application/migrations/209_unmark_unsupported_lotw_uploads.php new file mode 100644 index 000000000..2149334b0 --- /dev/null +++ b/application/migrations/209_unmark_unsupported_lotw_uploads.php @@ -0,0 +1,17 @@ +db->where_in('COL_PROP_MODE', $lotw_unsupported_modes); + $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'N')); + } + + public function down() { + } +} From f9b03fb8e5b33789e4410fa3500d8e3638064075 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 09:19:43 +0200 Subject: [PATCH 02/16] Do not set LoTW sent in edit QSO for unsupported modes --- application/models/Logbook_model.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 0ecebf935..3df51f86d 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1230,13 +1230,16 @@ class Logbook_model extends CI_Model { $eqsl_rcvd = 'N'; } - if ($this->input->post('lotw_sent')) { + // Missing in tqsl 2.7.3 config.xml + $lotw_unsupported_modes = array('INTERNET', 'RPT'); + + if ($this->input->post('lotw_sent') && !in_array($this->input->post('prop_mode'), $lotw_unsupported_modes)) { $lotw_sent = $this->input->post('lotw_sent'); } else { $lotw_sent = 'N'; } - if ($this->input->post('lotw_rcvd')) { + if ($this->input->post('lotw_rcvd') && !in_array($this->input->post('prop_mode'), $lotw_unsupported_modes)) { $lotw_rcvd = $this->input->post('lotw_rcvd'); } else { $lotw_rcvd = 'N'; @@ -1332,8 +1335,8 @@ class Logbook_model extends CI_Model { 'COL_QSLMSG' => $this->input->post('qslmsg'), 'COL_LOTW_QSLSDATE' => $lotwsdate, 'COL_LOTW_QSLRDATE' => $lotwrdate, - 'COL_LOTW_QSL_SENT' => $this->input->post('lotw_sent'), - 'COL_LOTW_QSL_RCVD' => $this->input->post('lotw_rcvd'), + 'COL_LOTW_QSL_SENT' => $lotw_sent, + 'COL_LOTW_QSL_RCVD' => $lotw_rcvd, 'COL_IOTA' => $this->input->post('iota_ref'), 'COL_SOTA_REF' => $this->input->post('sota_ref'), 'COL_WWFF_REF' => $this->input->post('wwff_ref'), From ca6db420f72be66de75ed42d40fcd0edba8783f7 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 09:29:09 +0200 Subject: [PATCH 03/16] Centralize unsupported prop modes variable --- application/config/lotw.php | 17 ++++++++++++++++- .../209_unmark_unsupported_lotw_uploads.php | 5 +---- application/models/Logbook_model.php | 12 +++--------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/application/config/lotw.php b/application/config/lotw.php index 43d14b947..b49574250 100644 --- a/application/config/lotw.php +++ b/application/config/lotw.php @@ -11,9 +11,24 @@ defined('BASEPATH') OR exit('No direct script access allowed'); |-------------------------------------------------------------------------- | Folder location for storing P12 certificate files on the system |-------------------------------------------------------------------------- -| +| | This folder must be outside of your www root for security reasons | */ $config['lotw_keys_folder'] = ""; +/* +|-------------------------------------------------------------------------- +| Propagation modes that are not supported by LoTW +|-------------------------------------------------------------------------- +| +| As per tqsl config the following propagation modes are not supported by +| LoTW and ignored. So Wavelog will not handle them during LoTW sync. +| As per tqsl v2.7.3 these modes are: +| - RPT +| - INTERNET +| Please do not edit! +| +*/ +$config['lotw_unsupported_prop_modes'] = array('INTERNET', 'RPT'); + diff --git a/application/migrations/209_unmark_unsupported_lotw_uploads.php b/application/migrations/209_unmark_unsupported_lotw_uploads.php index 2149334b0..0be3c5bf2 100644 --- a/application/migrations/209_unmark_unsupported_lotw_uploads.php +++ b/application/migrations/209_unmark_unsupported_lotw_uploads.php @@ -5,10 +5,7 @@ class Migration_unmark_unsupported_lotw_uploads extends CI_Migration { public function up() { - // Missing in tqsl 2.7.3 config.xml - $lotw_unsupported_modes = array('INTERNET', 'RPT'); - - $this->db->where_in('COL_PROP_MODE', $lotw_unsupported_modes); + $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_propmodes')); $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'N')); } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3df51f86d..eed16b219 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1230,16 +1230,13 @@ class Logbook_model extends CI_Model { $eqsl_rcvd = 'N'; } - // Missing in tqsl 2.7.3 config.xml - $lotw_unsupported_modes = array('INTERNET', 'RPT'); - - if ($this->input->post('lotw_sent') && !in_array($this->input->post('prop_mode'), $lotw_unsupported_modes)) { + if ($this->input->post('lotw_sent') && !in_array($this->input->post('prop_mode'), $this->config->item('lotw_unsupported_prop_modes'))) { $lotw_sent = $this->input->post('lotw_sent'); } else { $lotw_sent = 'N'; } - if ($this->input->post('lotw_rcvd') && !in_array($this->input->post('prop_mode'), $lotw_unsupported_modes)) { + if ($this->input->post('lotw_rcvd') && !in_array($this->input->post('prop_mode'), $this->config->item('lotw_unsupported_prop_modes'))) { $lotw_rcvd = $this->input->post('lotw_rcvd'); } else { $lotw_rcvd = 'N'; @@ -4855,9 +4852,6 @@ function lotw_last_qsl_date($user_id) { function get_lotw_qsos_to_upload($station_id, $start_date, $end_date) { - // Missing in tqsl 2.7.3 config.xml - $lotw_unsupported_modes = array('INTERNET', 'RPT'); - $this->db->select('COL_PRIMARY_KEY,COL_CALL, COL_BAND, COL_BAND_RX, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_FREQ, COL_FREQ_RX, COL_GRIDSQUARE, COL_SAT_NAME, COL_PROP_MODE, COL_LOTW_QSL_SENT, station_id'); $this->db->where("station_id", $station_id); @@ -4865,7 +4859,7 @@ function lotw_last_qsl_date($user_id) { $this->db->where('COL_LOTW_QSL_SENT', NULL); $this->db->or_where('COL_LOTW_QSL_SENT !=', "Y"); $this->db->group_end(); - $this->db->where_not_in('COL_PROP_MODE', $lotw_unsupported_modes); + $this->db->where_not_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_prop_modes')); $this->db->where('COL_TIME_ON >=', $start_date); $this->db->where('COL_TIME_ON <=', $end_date); $this->db->order_by("COL_TIME_ON", "desc"); From ce5a5e15c631fa21c6a166a388160d5b08288410 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 09:30:56 +0200 Subject: [PATCH 04/16] typo --- application/migrations/209_unmark_unsupported_lotw_uploads.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/209_unmark_unsupported_lotw_uploads.php b/application/migrations/209_unmark_unsupported_lotw_uploads.php index 0be3c5bf2..fdc416539 100644 --- a/application/migrations/209_unmark_unsupported_lotw_uploads.php +++ b/application/migrations/209_unmark_unsupported_lotw_uploads.php @@ -5,7 +5,7 @@ class Migration_unmark_unsupported_lotw_uploads extends CI_Migration { public function up() { - $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_propmodes')); + $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_prop_modes')); $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'N')); } From d3d31f3bdb41df357bb2644831a7a7ff157be94b Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 10:28:48 +0200 Subject: [PATCH 05/16] Set LoTW sent status to I (ignore) --- application/migrations/209_unmark_unsupported_lotw_uploads.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/209_unmark_unsupported_lotw_uploads.php b/application/migrations/209_unmark_unsupported_lotw_uploads.php index fdc416539..ca702492a 100644 --- a/application/migrations/209_unmark_unsupported_lotw_uploads.php +++ b/application/migrations/209_unmark_unsupported_lotw_uploads.php @@ -6,7 +6,7 @@ class Migration_unmark_unsupported_lotw_uploads extends CI_Migration public function up() { $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_prop_modes')); - $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'N')); + $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'I')); } public function down() { From 1c3da456ab9b20a8a2199b269dd0466e728a77d8 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 11:52:11 +0200 Subject: [PATCH 06/16] Add ignore/grey color for LoTW status --- application/models/Logbook_model.php | 4 +++- application/views/oqrs/qsolist.php | 10 ++++++---- application/views/qslprint/qsolist.php | 10 ++++++---- .../views/search/search_result_ajax.php | 10 ++++++---- .../views/view_log/partial/log_ajax.php | 18 +++++++++++++++++- assets/css/general.css | 5 +++++ src/QSLManager/QSO.php | 8 ++++++-- 7 files changed, 49 insertions(+), 16 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index eed16b219..97de91a9c 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1230,7 +1230,9 @@ class Logbook_model extends CI_Model { $eqsl_rcvd = 'N'; } - if ($this->input->post('lotw_sent') && !in_array($this->input->post('prop_mode'), $this->config->item('lotw_unsupported_prop_modes'))) { + if (in_array($this->input->post('prop_mode'), $this->config->item('lotw_unsupported_prop_modes'))) { + $lotw_sent = 'I'; + } elseif ($this->input->post('lotw_sent')) { $lotw_sent = $this->input->post('lotw_sent'); } else { $lotw_sent = 'N'; diff --git a/application/views/oqrs/qsolist.php b/application/views/oqrs/qsolist.php index 4fa9b4fe1..cd56a2f9a 100644 --- a/application/views/oqrs/qsolist.php +++ b/application/views/oqrs/qsolist.php @@ -161,11 +161,13 @@ if ($qsos->result() != NULL) { $timestamp = strtotime($qsl->COL_LOTW_QSLSDATE); echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - echo "\" data-bs-toggle=\"tooltip\""; + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($qsl->COL_LOTW_QSL_SENT == "I") { + echo " class=\"qsl-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + echo " class=\"lotw-red\""; } - echo ' class="lotw-'; - echo ($qsl->COL_LOTW_QSL_SENT=='Y')?'green':'red'; - echo '">▲'; + echo '>▲'; echo 'COL_LOTW_QSL_RCVD == "Y") { diff --git a/application/views/qslprint/qsolist.php b/application/views/qslprint/qsolist.php index 4a59defee..18c94fab6 100644 --- a/application/views/qslprint/qsolist.php +++ b/application/views/qslprint/qsolist.php @@ -169,11 +169,13 @@ if ($qsos->result() != NULL) { $timestamp = strtotime($qsl->COL_LOTW_QSLSDATE); echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - echo "\" data-bs-toggle=\"tooltip\""; + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($qsl->COL_LOTW_QSL_SENT == "I") { + echo "class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + echo " class=\"lotw-red\""; } - echo ' class="lotw-'; - echo ($qsl->COL_LOTW_QSL_SENT=='Y')?'green':'red'; - echo '">▲'; + echo '>▲'; echo 'COL_LOTW_QSL_RCVD == "Y") { diff --git a/application/views/search/search_result_ajax.php b/application/views/search/search_result_ajax.php index 16b76b5c7..84fb68c64 100644 --- a/application/views/search/search_result_ajax.php +++ b/application/views/search/search_result_ajax.php @@ -300,11 +300,13 @@ $ci =& get_instance(); $timestamp = strtotime($row->COL_LOTW_QSLSDATE); echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - echo "\" data-bs-toggle=\"tooltip\""; + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($row->COL_LOTW_QSL_SENT == "I") { + echo "class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + echo "class=\"lotw-red\""; } - echo ' class="lotw-'; - echo ($row->COL_LOTW_QSL_SENT=='Y')?'green':'red'; - echo '">▲'; + echo '>▲'; echo 'COL_LOTW_QSL_RCVD == "Y") { diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index a815196c9..8c979709b 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -227,7 +227,23 @@ function echo_table_col($row, $name) { session->userdata('user_default_confirmation'),'L') !== false && ($this->session->userdata('user_lotw_name') != "") ) { ?> - COL_LOTW_QSL_SENT == "Y") { echo "title=\"".__("LoTW")." ".__("Sent"); if ($row->COL_LOTW_QSLSDATE != null) { $timestamp = strtotime($row->COL_LOTW_QSLSDATE); echo " ".($timestamp!=''?date($custom_date_format, $timestamp):''); } echo "\" data-bs-toggle=\"tooltip\""; } ?> class="lotw-COL_LOTW_QSL_SENT=='Y')?'green':'red'?>">▲ + COL_LOTW_QSL_SENT) { + case "Y": + echo "title=\"".__("LoTW")." ".__("Sent"); + if ($row->COL_LOTW_QSLSDATE != null) { + $timestamp = strtotime($row->COL_LOTW_QSLSDATE); + echo " ".($timestamp!=''?date($custom_date_format, $timestamp):''); + } + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + break; + case "I": + echo " class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + break; + default: + echo " class=\"lotw-red\""; + break; + } + ?>>▲ COL_LOTW_QSL_RCVD == "Y") { echo "title=\"".__("LoTW")." ".__("Received"); if ($row->COL_LOTW_QSLRDATE != null) { $timestamp = strtotime($row->COL_LOTW_QSLRDATE); echo " ".($timestamp!=''?date($custom_date_format, $timestamp):''); } echo "\" data-bs-toggle=\"tooltip\""; } ?> class="lotw-COL_LOTW_QSL_RCVD=='Y')?'green':'red'?>">▼ diff --git a/assets/css/general.css b/assets/css/general.css index f6f1c24d1..16231a0d2 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -404,6 +404,11 @@ TD.lotw { font-size: 1.1em; } +.lotw-grey { + color: #dddddd !important; + font-size: 1.1em; +} + .qso-edit-box { padding: 10px; } diff --git a/src/QSLManager/QSO.php b/src/QSLManager/QSO.php index ea18da2ec..009dcb9c8 100644 --- a/src/QSLManager/QSO.php +++ b/src/QSLManager/QSO.php @@ -369,10 +369,14 @@ class QSO $timestamp = strtotime($data['COL_LOTW_QSLSDATE']); $lotwstring .= " ". ($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - $lotwstring .= "\" data-bs-toggle=\"tooltip\""; + $lotwstring .= "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($data['COL_LOTW_QSL_SENT'] == "I") { + $lotwstring .= "class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + $lotwstring .= "class=\"lotw-red\""; } - $lotwstring .= ' class="lotw-' . (($data['COL_LOTW_QSL_SENT']=='Y') ? 'green' : 'red') . '">▲'; + $lotwstring .= '>▲'; $lotwstring .= ' Date: Fri, 12 Jul 2024 12:51:11 +0200 Subject: [PATCH 07/16] Mark QSOs to be ignored as I before uploading --- application/controllers/Lotw.php | 3 +++ application/models/Logbook_model.php | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 81ac3b439..e72809181 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -236,6 +236,9 @@ class Lotw extends CI_Controller { $this->load->model('Logbook_model'); + // First mark QSOs with unsupported propagation modes as ignore + $this->Logbook_model->mark_lotw_ignore($data['station_profile']->station_id); + $data['qsos'] = $this->Logbook_model->get_lotw_qsos_to_upload($data['station_profile']->station_id, $data['lotw_cert_info']->qso_start_date, $data['lotw_cert_info']->qso_end_date); // Nothing to upload diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 97de91a9c..e7b390900 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4886,6 +4886,16 @@ function lotw_last_qsl_date($user_id) { return "Updated"; } + function mark_lotw_ignore($station_id) { + $data = array( + 'COL_LOTW_QSLSDATE' => null, + 'COL_LOTW_QSL_SENT' => 'I', + ); + $this->db->where("station_id", $station_id); + $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_prop_modes')); + $this->db->update($this->config->item('table_name'), $data); + } + function county_qso_details($state, $county) { $this->load->model('logbooks_model'); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); From e8125f6b17bc5094c376978c69bc0f373dcab5ed Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 14:17:28 +0200 Subject: [PATCH 08/16] Add hint to QSO edit form --- application/controllers/Qso.php | 4 ++++ application/views/qso/edit_ajax.php | 5 +++-- assets/js/sections/common.js | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 9181001fe..14842e093 100644 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -597,6 +597,10 @@ class QSO extends CI_Controller { echo json_encode($return_json); } + public function unsupported_lotw_prop_modes() { + echo json_encode($this->config->item('lotw_unsupported_prop_modes')); + } + function check_locator($grid) { $grid = $this->input->post('locator'); // Allow empty locator diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index 863e26cd8..735475ed6 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -185,7 +185,7 @@
-
+
+ COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled."); } else { echo " "; } ?>
@@ -489,7 +490,7 @@
- diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index d209f5ab9..d0c941223 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -265,6 +265,26 @@ function qso_edit(id) { selectize_usa_county('#stateDropdown', '#stationCntyInputEdit'); } + var unsupported_lotw_prop_modes = []; + $.ajax({ + url: base_url + 'index.php/qso/unsupported_lotw_prop_modes', + type: 'get', + async: false, + success: function(data) { + unsupported_lotw_prop_modes = $.parseJSON(data); + }, + }); + + $('#prop_mode').change(function(){ + if (unsupported_lotw_prop_modes.includes($('#prop_mode').val())) { + $('#lotw_sent').prop('disabled', true); + $('#lotw_sent_hint').html("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled.").fadeIn("slow"); + } else { + $('#lotw_sent').prop('disabled', false); + $('#lotw_sent_hint').html(" ").fadeIn("fast"); + } + }); + $('#stateDropdown').change(function(){ var state = $("#stateDropdown option:selected").text(); if (state != "") { From 7510503b247eb5c033b71d05d6950d7b3bea816b Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 14:23:20 +0200 Subject: [PATCH 09/16] Disable LoTW sent field if prop_mode is unsupported --- application/views/qso/edit_ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index 735475ed6..3a09e6dcc 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -490,7 +490,7 @@
- COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo "disabled=\"disabled\""; } ?>> From 17542767b515bffe68bebdf1dece9a0a386a3f9e Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 12 Jul 2024 18:45:25 +0200 Subject: [PATCH 10/16] Apply LoTW ignore also to RCVD fields --- .../209_unmark_unsupported_lotw_uploads.php | 2 +- application/models/Logbook_model.php | 6 +++++- application/views/oqrs/qsolist.php | 10 ++++++---- application/views/qslprint/qsolist.php | 10 ++++++---- application/views/qso/edit_ajax.php | 4 ++-- .../views/search/search_result_ajax.php | 10 ++++++---- .../views/view_log/partial/log_ajax.php | 18 +++++++++++++++++- assets/js/sections/common.js | 6 ++++-- src/QSLManager/QSO.php | 9 ++++++--- 9 files changed, 53 insertions(+), 22 deletions(-) diff --git a/application/migrations/209_unmark_unsupported_lotw_uploads.php b/application/migrations/209_unmark_unsupported_lotw_uploads.php index ca702492a..d39dd6844 100644 --- a/application/migrations/209_unmark_unsupported_lotw_uploads.php +++ b/application/migrations/209_unmark_unsupported_lotw_uploads.php @@ -6,7 +6,7 @@ class Migration_unmark_unsupported_lotw_uploads extends CI_Migration public function up() { $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_prop_modes')); - $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'I')); + $this->db->update($this->config->item('table_name'), array('COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'I', 'COL_LOTW_QSLRDATE' => null, 'COL_LOTW_QSL_RCVD' => 'I')); } public function down() { diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index e7b390900..490ed82a3 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1238,7 +1238,9 @@ class Logbook_model extends CI_Model { $lotw_sent = 'N'; } - if ($this->input->post('lotw_rcvd') && !in_array($this->input->post('prop_mode'), $this->config->item('lotw_unsupported_prop_modes'))) { + if (in_array($this->input->post('prop_mode'), $this->config->item('lotw_unsupported_prop_modes'))) { + $lotw_rcvd = 'I'; + } elseif ($this->input->post('lotw_rcvd')) { $lotw_rcvd = $this->input->post('lotw_rcvd'); } else { $lotw_rcvd = 'N'; @@ -4890,6 +4892,8 @@ function lotw_last_qsl_date($user_id) { $data = array( 'COL_LOTW_QSLSDATE' => null, 'COL_LOTW_QSL_SENT' => 'I', + 'COL_LOTW_QSLRDATE' => null, + 'COL_LOTW_QSL_RCVD' => 'I', ); $this->db->where("station_id", $station_id); $this->db->where_in('COL_PROP_MODE', $this->config->item('lotw_unsupported_prop_modes')); diff --git a/application/views/oqrs/qsolist.php b/application/views/oqrs/qsolist.php index cd56a2f9a..90711cd62 100644 --- a/application/views/oqrs/qsolist.php +++ b/application/views/oqrs/qsolist.php @@ -176,11 +176,13 @@ if ($qsos->result() != NULL) { $timestamp = strtotime($qsl->COL_LOTW_QSLRDATE); echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - echo "\" data-bs-toggle=\"tooltip\""; + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($qsl->COL_LOTW_QSL_RCVD == "I") { + echo " class=\"qsl-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + echo " class=\"lotw-red\""; } - echo ' class="lotw-'; - echo ($qsl->COL_LOTW_QSL_RCVD=='Y')?'green':'red'; - echo '">▼'; + echo '>▼'; echo ''; } echo ''; diff --git a/application/views/qslprint/qsolist.php b/application/views/qslprint/qsolist.php index 18c94fab6..aeadf894e 100644 --- a/application/views/qslprint/qsolist.php +++ b/application/views/qslprint/qsolist.php @@ -184,11 +184,13 @@ if ($qsos->result() != NULL) { $timestamp = strtotime($qsl->COL_LOTW_QSLRDATE); echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - echo "\" data-bs-toggle=\"tooltip\""; + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($qsl->COL_LOTW_QSL_RCVD == "I") { + echo "class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + echo " class=\"lotw-red\""; } - echo ' class="lotw-'; - echo ($qsl->COL_LOTW_QSL_RCVD=='Y')?'green':'red'; - echo '">▼'; + echo '>▼'; echo ''; } echo ''; diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index 3a09e6dcc..f9c067f79 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -208,7 +208,7 @@ - COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled."); } else { echo " "; } ?> + COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled."); } else { echo " "; } ?>
@@ -502,7 +502,7 @@
- COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo "disabled=\"disabled\""; } ?>> diff --git a/application/views/search/search_result_ajax.php b/application/views/search/search_result_ajax.php index 84fb68c64..1ec06b442 100644 --- a/application/views/search/search_result_ajax.php +++ b/application/views/search/search_result_ajax.php @@ -315,11 +315,13 @@ $ci =& get_instance(); $timestamp = strtotime($row->COL_LOTW_QSLRDATE); echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - echo "\" data-bs-toggle=\"tooltip\""; + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($row->COL_LOTW_QSL_RCVD == "I") { + echo "class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + echo "class=\"lotw-red\""; } - echo ' class="lotw-'; - echo ($row->COL_LOTW_QSL_RCVD=='Y')?'green':'red'; - echo '">▼'; + echo '>▼'; echo ''; } ?> diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index 8c979709b..3766daf7d 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -244,7 +244,23 @@ function echo_table_col($row, $name) { break; } ?>>▲ - COL_LOTW_QSL_RCVD == "Y") { echo "title=\"".__("LoTW")." ".__("Received"); if ($row->COL_LOTW_QSLRDATE != null) { $timestamp = strtotime($row->COL_LOTW_QSLRDATE); echo " ".($timestamp!=''?date($custom_date_format, $timestamp):''); } echo "\" data-bs-toggle=\"tooltip\""; } ?> class="lotw-COL_LOTW_QSL_RCVD=='Y')?'green':'red'?>">▼ + COL_LOTW_QSL_RCVD) { + case "Y": + echo "title=\"".__("LoTW")." ".__("Received"); + if ($row->COL_LOTW_QSLRDATE != null) { + $timestamp = strtotime($row->COL_LOTW_QSLRDATE); + echo " ".($timestamp!=''?date($custom_date_format, $timestamp):''); + } + echo "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + break; + case "I": + echo " class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + break; + default: + echo " class=\"lotw-red\""; + break; + } + ?>>▼ diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index d0c941223..6ec2bf408 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -278,10 +278,12 @@ function qso_edit(id) { $('#prop_mode').change(function(){ if (unsupported_lotw_prop_modes.includes($('#prop_mode').val())) { $('#lotw_sent').prop('disabled', true); - $('#lotw_sent_hint').html("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled.").fadeIn("slow"); + $('#lotw_rcvd').prop('disabled', true); + $('#lotw_propmode_hint').html("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled.").fadeIn("slow"); } else { $('#lotw_sent').prop('disabled', false); - $('#lotw_sent_hint').html(" ").fadeIn("fast"); + $('#lotw_rcvd').prop('disabled', false); + $('#lotw_propmode_hint').html(" ").fadeIn("fast"); } }); diff --git a/src/QSLManager/QSO.php b/src/QSLManager/QSO.php index 009dcb9c8..c7d4137ee 100644 --- a/src/QSLManager/QSO.php +++ b/src/QSLManager/QSO.php @@ -386,11 +386,14 @@ class QSO $timestamp = strtotime($data['COL_LOTW_QSLRDATE']); $lotwstring .= " ". ($timestamp != '' ? date($custom_date_format, $timestamp) : ''); } - - $lotwstring .= "\" data-bs-toggle=\"tooltip\""; + $lotwstring .= "\" data-bs-toggle=\"tooltip\" class=\"lotw-green\""; + } elseif ($data['COL_LOTW_QSL_RCVD'] == "I") { + $lotwstring .= "class=\"lotw-grey\" data-bs-toggle=\"tooltip\" title=\"".__("Invalid (Ignore)")."\""; + } else { + $lotwstring .= "class=\"lotw-red\""; } - $lotwstring .= ' class="lotw-' . (($data['COL_LOTW_QSL_RCVD']=='Y') ? 'green':'red') . '">▼'; + $lotwstring .= '>▼'; return $lotwstring; } From be685b34519c0a15763297ac296d0ddb4683da9d Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 13 Jul 2024 13:56:26 +0200 Subject: [PATCH 11/16] Use translation instead of fixed string --- application/views/interface_assets/footer.php | 3 ++- assets/js/sections/common.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 179e4dcb0..366f4ad4c 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -31,6 +31,7 @@ var lang_admin_close = ""; var lang_admin_save = ""; var lang_admin_clear = ""; + var lang_lotw_propmode_hint = ""; @@ -2698,4 +2699,4 @@ if (isset($scripts) && is_array($scripts)){ ?> - \ No newline at end of file + diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index 6ec2bf408..ceb0f005a 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -279,7 +279,7 @@ function qso_edit(id) { if (unsupported_lotw_prop_modes.includes($('#prop_mode').val())) { $('#lotw_sent').prop('disabled', true); $('#lotw_rcvd').prop('disabled', true); - $('#lotw_propmode_hint').html("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled.").fadeIn("slow"); + $('#lotw_propmode_hint').html(lang_lotw_propmode_hint).fadeIn("slow"); } else { $('#lotw_sent').prop('disabled', false); $('#lotw_rcvd').prop('disabled', false); From 5c1b210b1bbafdf74fb1e3a9d607605b3fff3aba Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 13 Jul 2024 14:00:32 +0200 Subject: [PATCH 12/16] Align wording --- application/views/interface_assets/footer.php | 2 +- application/views/qso/edit_ajax.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 366f4ad4c..64cb0b15c 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -31,7 +31,7 @@ var lang_admin_close = ""; var lang_admin_save = ""; var lang_admin_clear = ""; - var lang_lotw_propmode_hint = ""; + var lang_lotw_propmode_hint = ""; diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index f9c067f79..52ef30769 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -208,7 +208,7 @@ - COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("This propagation mode is not supported by LoTW. LoTW sent/received fields disabled."); } else { echo " "; } ?> + COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("This propagation mode is not supported by LoTW. LoTW QSL fields disabled."); } else { echo " "; } ?>
From d4e67e14e7e8b0c0276cb66c046e9947f684db8e Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 13 Jul 2024 14:06:54 +0200 Subject: [PATCH 13/16] Add German translation --- .../locale/de_DE/LC_MESSAGES/messages.po | 347 +++++++++--------- 1 file changed, 181 insertions(+), 166 deletions(-) diff --git a/application/locale/de_DE/LC_MESSAGES/messages.po b/application/locale/de_DE/LC_MESSAGES/messages.po index 41e2764d6..66f2ef535 100644 --- a/application/locale/de_DE/LC_MESSAGES/messages.po +++ b/application/locale/de_DE/LC_MESSAGES/messages.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-11 22:38+0000\n" +"POT-Creation-Date: 2024-07-13 14:04+0200\n" "PO-Revision-Date: 2024-07-11 14:51+0000\n" "Last-Translator: Fabian Berg \n" "Language-Team: German Date: Sun, 14 Jul 2024 11:09:55 +0200 Subject: [PATCH 14/16] Mark unsupported propmode on logging --- application/models/Logbook_model.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 490ed82a3..acbfb947c 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -299,7 +299,7 @@ class Logbook_model extends CI_Model { 'COL_SIG' => $this->input->post('sig') == null ? '' : trim($this->input->post('sig')), 'COL_SIG_INFO' => $this->input->post('sig_info') == null ? '' : trim($this->input->post('sig_info')), 'COL_DARC_DOK' => $darc_dok == null ? '' : strtoupper(trim($darc_dok)), - 'COL_NOTES' => $this->input->post('notes'), + 'COL_NOTES' => $this->input->post('notes'), ); $station_id = $this->input->post('station_profile'); @@ -370,8 +370,13 @@ class Logbook_model extends CI_Model { // if LoTW username set, default SENT & RCVD to 'N' else leave as null if ($this->session->userdata('user_lotw_name')){ - $data['COL_LOTW_QSL_SENT'] = 'N'; - $data['COL_LOTW_QSL_RCVD'] = 'N'; + if (in_array($prop_mode, $this->config->item('lotw_unsupported_prop_modes'))) { + $data['COL_LOTW_QSL_SENT'] = 'I'; + $data['COL_LOTW_QSL_RCVD'] = 'I'; + } else { + $data['COL_LOTW_QSL_SENT'] = 'N'; + $data['COL_LOTW_QSL_RCVD'] = 'N'; + } } $this->add_qso($data, $skipexport = false); From 9e027cfdce3166f2b7124749a1f9eba4152fac1a Mon Sep 17 00:00:00 2001 From: phl0 Date: Sun, 14 Jul 2024 11:25:52 +0200 Subject: [PATCH 15/16] Aligned wording and added hint to LoTW QSL tab --- application/locale/de_DE/LC_MESSAGES/messages.po | 4 ++-- application/views/interface_assets/footer.php | 2 +- application/views/qso/edit_ajax.php | 8 +++++--- assets/js/sections/common.js | 8 ++++++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/application/locale/de_DE/LC_MESSAGES/messages.po b/application/locale/de_DE/LC_MESSAGES/messages.po index e3e1674ee..2ed2386f3 100644 --- a/application/locale/de_DE/LC_MESSAGES/messages.po +++ b/application/locale/de_DE/LC_MESSAGES/messages.po @@ -6125,8 +6125,8 @@ msgstr "Zurücksetzen" #: application/views/interface_assets/footer.php:34 #: application/views/qso/edit_ajax.php:211 msgid "" -"This propagation mode is not supported by LoTW. LoTW QSL fields disabled." -msgstr "Diese Ausbreitungsart wird von LotW nicht unterstützt. LoTW QSL Felder deaktiviert." +"Propagation mode is not supported by LoTW. LoTW QSL fields disabled." +msgstr "Ausbreitungsart wird von LotW nicht unterstützt. LoTW QSL Felder deaktiviert." #: application/views/interface_assets/footer.php:116 #: application/views/interface_assets/header.php:426 diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 64cb0b15c..c6fdeda05 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -31,7 +31,7 @@ var lang_admin_close = ""; var lang_admin_save = ""; var lang_admin_clear = ""; - var lang_lotw_propmode_hint = ""; + var lang_lotw_propmode_hint = ""; diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index 52ef30769..10846632f 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -208,7 +208,7 @@ - COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("This propagation mode is not supported by LoTW. LoTW QSL fields disabled."); } else { echo " "; } ?> + COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("Propagation mode is not supported by LoTW. LoTW QSL fields disabled."); } else { echo " "; } ?>
@@ -479,7 +479,7 @@
- +
@@ -508,7 +508,9 @@ -
+ + COL_PROP_MODE, $this->config->item('lotw_unsupported_prop_modes'))) { echo __("Propagation mode is not supported by LoTW. LoTW QSL fields disabled."); } else { echo " "; } ?> +
diff --git a/assets/js/sections/common.js b/assets/js/sections/common.js index ceb0f005a..634dfe733 100644 --- a/assets/js/sections/common.js +++ b/assets/js/sections/common.js @@ -279,11 +279,15 @@ function qso_edit(id) { if (unsupported_lotw_prop_modes.includes($('#prop_mode').val())) { $('#lotw_sent').prop('disabled', true); $('#lotw_rcvd').prop('disabled', true); - $('#lotw_propmode_hint').html(lang_lotw_propmode_hint).fadeIn("slow"); + $('*[id=lotw_propmode_hint]').each(function() { + $(this).html(lang_lotw_propmode_hint).fadeIn("slow"); + }); } else { $('#lotw_sent').prop('disabled', false); $('#lotw_rcvd').prop('disabled', false); - $('#lotw_propmode_hint').html(" ").fadeIn("fast"); + $('*[id=lotw_propmode_hint]').each(function() { + $(this).html(" ").fadeIn("fast"); + }); } }); From 7b1f5c5b0980fe652d33d5ccbd51fc5e78a7fe7e Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 14 Jul 2024 09:36:24 +0000 Subject: [PATCH 16/16] po/mo updates --- .../locale/bg_BG/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/cs_CZ/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/de_DE/LC_MESSAGES/messages.mo | Bin 168835 -> 168999 bytes .../locale/de_DE/LC_MESSAGES/messages.po | 43 +-- .../locale/el_GR/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/es_ES/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/fi_FI/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/fr_FR/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/it_IT/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/nl_NL/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/pl_PL/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/ru_RU/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/sv_SE/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/tr_TR/LC_MESSAGES/messages.po | 347 +++++++++--------- .../locale/zh_CN/LC_MESSAGES/messages.po | 347 +++++++++--------- assets/lang_src/messages.pot | 347 +++++++++--------- .../includes/gettext/lang_src/installer.pot | 2 +- 17 files changed, 2557 insertions(+), 2346 deletions(-) diff --git a/application/locale/bg_BG/LC_MESSAGES/messages.po b/application/locale/bg_BG/LC_MESSAGES/messages.po index 2624d5052..4ea964f3d 100644 --- a/application/locale/bg_BG/LC_MESSAGES/messages.po +++ b/application/locale/bg_BG/LC_MESSAGES/messages.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-13 09:35+0000\n" +"POT-Creation-Date: 2024-07-14 09:36+0000\n" "PO-Revision-Date: 2024-07-09 13:25+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Bulgarian