[Station Locations] Added Belarus States

pull/3119/head^2
Peter Goodhall 2024-05-22 13:47:45 +01:00
rodzic ca12d2406e
commit fcea4a86a4
2 zmienionych plików z 32 dodań i 0 usunięć

Wyświetl plik

@ -247,6 +247,22 @@
</div>
<div class="mb-3" id="belarus_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="MI" <?php if($my_station_profile->state == "MI") { echo "selected"; } ?>>Minsk (Minskaya voblasts')</option>
<option value="BR" <?php if($my_station_profile->state == "BR") { echo "selected"; } ?>>Brest (Brestskaya voblasts')</option>
<option value="HR" <?php if($my_station_profile->state == "HR") { echo "selected"; } ?>>Grodno (Hrodzenskaya voblasts')</option>
<option value="VI" <?php if($my_station_profile->state == "VI") { echo "selected"; } ?>>Vitebsk (Vitsyebskaya voblasts')</option>
<option value="MA" <?php if($my_station_profile->state == "MA") { echo "selected"; } ?>>Mogilev (Mahilyowskaya voblasts')</option>
<option value="HO" <?php if($my_station_profile->state == "HO") { echo "selected"; } ?>>Gomel (Homyel'skaya voblasts')</option>
<option value="HM" <?php if($my_station_profile->state == "HM") { echo "selected"; } ?>>Horad Minsk</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>

Wyświetl plik

@ -12,6 +12,7 @@ $(document).ready( function () {
$("#canada_state").hide();
$("#aland_state").hide();
$("#asiatic_russia_state").hide();
$("#belarus_state").hide();
var selectedDXCCID = $('#dxcc_select').find(":selected").val();
@ -37,6 +38,15 @@ $(document).ready( function () {
$("#us_state").hide();
}
// Show Belarus States if Belarus is selected
if(selectedDXCCID == '27'){
$("#belarus_state").show();
$("#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!");
@ -51,6 +61,12 @@ $(document).ready( function () {
$("#aland_state").hide();
$("#canada_state").hide();
$("#us_state").hide();
} else if($(this).val() == '27') {
$("#belarus_state").show();
$("#asiatic_russia_state").hide();
$("#aland_state").hide();
$("#canada_state").hide();
$("#us_state").hide();
} else {
$("#canada_state").hide();
$("#us_state").show();