From 52890a61567bf3a035ae5e098864da41b1c0e77c Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sun, 19 Nov 2023 17:04:19 +0100 Subject: [PATCH] no mark_lotw if no station is selected --- application/views/adif/import.php | 2 +- application/views/interface_assets/footer.php | 4 ++++ assets/js/sections/adif.js | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 assets/js/sections/adif.js diff --git a/application/views/adif/import.php b/application/views/adif/import.php index af3ac575..9375649b 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -215,7 +215,7 @@
- +
assets/js/sections/maintenance.js"> +uri->segment(1) == "adif" ) { ?> + + + uri->segment(1) == "notes" && ($this->uri->segment(2) == "add" || $this->uri->segment(2) == "edit") ) { ?> diff --git a/assets/js/sections/adif.js b/assets/js/sections/adif.js new file mode 100644 index 00000000..0dfd7e75 --- /dev/null +++ b/assets/js/sections/adif.js @@ -0,0 +1,11 @@ +$(document).ready(function(){ + $('#markExportedToLotw').click(function(e){ + let form = $(this).closest('form'); + let station = form.find('select[name=station_profile]'); + if (station.val() == 0) { + station.addClass('is-invalid'); + }else{ + form.submit(); + } + }) +}); \ No newline at end of file