Skip to content

Commit

Permalink
Added states/provinces of The Netherlands
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbug authored Jun 28, 2024
2 parents 9d44e93 + 534d2d7 commit 48c0c04
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
20 changes: 20 additions & 0 deletions application/views/station_profile/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,26 @@
<small id="StateHelp" class="form-text text-muted"><?php echo lang("station_location_state_hint"); ?></small>
</div>

<div class="mb-3" id="netherlands_state">
<label for="stateInput"><?php echo lang("station_location_state"); ?></label>
<select class="form-select" name="station_state" id="StateHelp" aria-describedby="stationCntyInputHelp">
<option value=""></option>
<option value="DR" <?php if($my_station_profile->state == "DR") { echo "selected"; } ?>>Drenthe</option>
<option value="FL" <?php if($my_station_profile->state == "FL") { echo "selected"; } ?>>Flevoland</option>
<option value="FR" <?php if($my_station_profile->state == "FR") { echo "selected"; } ?>>Friesland</option>
<option value="GD" <?php if($my_station_profile->state == "GD") { echo "selected"; } ?>>Gelderland</option>
<option value="GR" <?php if($my_station_profile->state == "GR") { echo "selected"; } ?>>Groningen</option>
<option value="LB" <?php if($my_station_profile->state == "LB") { echo "selected"; } ?>>Limburg</option>
<option value="NB" <?php if($my_station_profile->state == "NB") { echo "selected"; } ?>>Noord-Brabant</option>
<option value="NH" <?php if($my_station_profile->state == "NH") { echo "selected"; } ?>>Noord-Holland</option>
<option value="OV" <?php if($my_station_profile->state == "OV") { echo "selected"; } ?>>Overijssel</option>
<option value="UT" <?php if($my_station_profile->state == "UT") { echo "selected"; } ?>>Utrecht</option>
<option value="ZH" <?php if($my_station_profile->state == "ZH") { echo "selected"; } ?>>Zuid-Holland</option>
<option value="ZL" <?php if($my_station_profile->state == "ZL") { echo "selected"; } ?>>Zeeland</option>
</select>
<small id="StateHelp" class="form-text text-muted"><?php echo lang("station_location_state_hint"); ?></small>
</div>

<!-- US County -->
<div class="mb-3">
<label for="stationCntyInput"><?php echo lang("station_location_county"); ?></label>
Expand Down
5 changes: 3 additions & 2 deletions assets/js/sections/station_locations.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ $(document).ready( function () {
'170': 'nz_state',
'209': 'belgium_state',
'248': 'italy_state',
'263': 'netherlands_state',
'6': 'us_state' // Alaska
};

// Hide all states initially
$("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state, #korea_state, #uruguay_state, #venezuela_state, #australia_state, #png_state, #nz_state, #belgium_state, #italy_state").hide();
$("#canada_state, #aland_state, #asiatic_russia_state, #belarus_state, #mexico_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #us_state, #paraguay_state, #korea_state, #uruguay_state, #venezuela_state, #australia_state, #png_state, #nz_state, #belgium_state, #italy_state, #netherlands_state").hide();
/**
* Gets the selected DXCC ID and shows the corresponding state.
*/
Expand All @@ -68,7 +69,7 @@ $(document).ready( function () {
var stateToShow = stateMap[selectedValue] || stateMap['default'];

// Hide all states
$("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state, #korea_state, #uruguay_state, #venezuela_state, #australia_state, #png_state, #nz_state, #belgium_state, #italy_state").hide();
$("#mexico_state, #belarus_state, #asiatic_russia_state, #aland_state, #canada_state, #us_state, #eu_russia_state, #argentina_state, #brazil_state, #chile_state, #paraguay_state, #korea_state, #uruguay_state, #venezuela_state, #australia_state, #png_state, #nz_state, #belgium_state, #italy_state, #netherlands_state").hide();

// Show the selected state
$("#" + stateToShow).show();
Expand Down

0 comments on commit 48c0c04

Please sign in to comment.