From e7dec782f362926b5b44b45f4b86b0e640278eec Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 22 May 2024 13:51:38 +0100 Subject: [PATCH] [Station Locations] Added Mexico States --- application/views/station_profile/edit.php | 41 +++++++++++++++++++++- assets/js/sections/station_locations.js | 18 ++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index f2481b5b..3d57da6a 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -246,7 +246,6 @@ -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index f82e962b..f3ef1335 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -13,6 +13,7 @@ $(document).ready( function () { $("#aland_state").hide(); $("#asiatic_russia_state").hide(); $("#belarus_state").hide(); + $("#mexico_state").hide(); var selectedDXCCID = $('#dxcc_select').find(":selected").val(); @@ -47,6 +48,16 @@ $(document).ready( function () { $("#us_state").hide(); } + // Show Mexico States if Mexico is selected + if(selectedDXCCID == '50'){ + $("#mexico_state").show(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); + } + $('#dxcc_select').change(function(){ if($(this).val() == '1'){ // or this.value == 'volvo' console.log("CANADA!"); @@ -67,6 +78,13 @@ $(document).ready( function () { $("#aland_state").hide(); $("#canada_state").hide(); $("#us_state").hide(); + } else if($(this).val() == '50') { + $("#mexico_state").show(); + $("#belarus_state").hide(); + $("#asiatic_russia_state").hide(); + $("#aland_state").hide(); + $("#canada_state").hide(); + $("#us_state").hide(); } else { $("#canada_state").hide(); $("#us_state").show();