From 8341c1acc65c0b4da8f6540734e34a9dca65b21d Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 10 Aug 2025 08:03:33 +0200 Subject: [PATCH] Fix if no locations have OQRS enabled --- application/controllers/Oqrs.php | 2 +- application/views/oqrs/index.php | 107 +++++++++++++++---------------- 2 files changed, 54 insertions(+), 55 deletions(-) diff --git a/application/controllers/Oqrs.php b/application/controllers/Oqrs.php index fd4caa615..70a532626 100644 --- a/application/controllers/Oqrs.php +++ b/application/controllers/Oqrs.php @@ -117,7 +117,7 @@ class Oqrs extends CI_Controller { if($this->input->post('widget') != 'true') { $this->load->view('oqrs/request_grouped', $data); } else { - $data['stations'] = $this->oqrs_model->get_oqrs_stations($userid)->result(); + $data['stations'] = $this->oqrs_model->get_oqrs_stations($userid); $data['page_title'] = __("Log Search & OQRS"); $data['global_oqrs_text'] = $this->optionslib->get_option('global_oqrs_text'); $data['groupedSearch'] = 'on'; diff --git a/application/views/oqrs/index.php b/application/views/oqrs/index.php index 8bdc1bd38..e09039681 100644 --- a/application/views/oqrs/index.php +++ b/application/views/oqrs/index.php @@ -13,64 +13,63 @@

'; - } - if (($widget_call ?? false) == true) { - $callsign_value = 'value="'.$callsign.'"'; - } else { - $callsign_value = ''; - } - if ($groupedSearch == 'on') { - echo __("This search will search in all station locations where OQRS is active.").'

- - - -
'; - echo '
'; - ?> - -
- result()) { ?> + // Execute a function when the user presses a key on the keyboard + input.addEventListener("keypress", function(event) { + // If the user presses the "Enter" key on the keyboard + if (event.key === "Enter") { + // Cancel the default action, if needed + event.preventDefault(); + // Trigger the button element with a click + document.getElementById("stationbuttonsubmit").click(); + } + }); + + + -
- - - -
- -
+
+ + + +
+ +
-
- + + } else { + echo __("No stations found that are using Wavelog OQRS."); + } + ?>