From a2c005d2fe7bbc6cbeb636296961550062ff668d Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Thu, 21 Mar 2024 08:57:49 +0100
Subject: [PATCH] Disabling buttons when unlinking locations
---
application/views/stationsetup/linkedlocations.php | 4 ++--
assets/js/sections/stationsetup.js | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/application/views/stationsetup/linkedlocations.php b/application/views/stationsetup/linkedlocations.php
index 16a4caf0e..4bf17d311 100644
--- a/application/views/stationsetup/linkedlocations.php
+++ b/application/views/stationsetup/linkedlocations.php
@@ -22,7 +22,7 @@
-
+
| station_profile_name;?> | station_callsign;?> | station_country; if ($row->end != NULL) { echo ' '.lang('gen_hamradio_deleted_dxcc').''; } ?> | -+ | ') .append($(' | ').append(jdata.locationdata[0].station_profile_name)) .append($(' | ').append(jdata.locationdata[0].station_callsign)) .append($(' | ').append(jdata.locationdata[0].station_country+(jdata.locationdata[0].dxcc_end == null ? '' : ' Deleted DXCC'))) - .append($(' | ').append('')) + .append($(' | ').append('')) ) } else { $("#flashdata").html(jdata.flashdata); } + $('.linkLocationButton').prop("disabled", false); }, error: function(e) { $("#flashdata").html("An unknown Error occured"); + $('.linkLocationButton').prop("disabled", false); } }); } function unLinkLocations(containerid, locationid) { + $('.unlinkbutton').prop("disabled", true); $.ajax({ url: base_url + 'index.php/stationsetup/unLinkLocations', type: 'post', @@ -571,8 +574,10 @@ function unLinkLocations(containerid, locationid) { ); $('#StationLocationSelect').append(items.join( "" )); $('#locationid_'+locationid).remove(); + $('.unlinkbutton').prop("disabled", false); } else { $("#flashdata").data(jdata.flashdata); + $('.unlinkbutton').prop("disabled", false); } }, error: function(e) { |