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; }