[Station Locations] Added Brazil States

pull/3119/head^2
Peter Goodhall 2024-05-23 14:45:38 +01:00
rodzic 43ecde4986
commit de7a82cc3f
2 zmienionych plików z 81 dodań i 1 usunięć

Wyświetl plik

@ -392,6 +392,41 @@
<small id="StateHelp" class="form-text text-muted"><?php echo lang("station_location_state_hint"); ?></small>
</div>
<div class="mb-3" id="brazil_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="ES" <?php if($my_station_profile->state == "ES") { echo "selected"; } ?>>Espírito Santo</option>
<option value="GO" <?php if($my_station_profile->state == "GO") { echo "selected"; } ?>>Goiás</option>
<option value="SC" <?php if($my_station_profile->state == "SC") { echo "selected"; } ?>>Santa Catarina</option>
<option value="SE" <?php if($my_station_profile->state == "SE") { echo "selected"; } ?>>Sergipe</option>
<option value="AL" <?php if($my_station_profile->state == "AL") { echo "selected"; } ?>>Alagoas</option>
<option value="AM" <?php if($my_station_profile->state == "AM") { echo "selected"; } ?>>Amazonas</option>
<option value="TO" <?php if($my_station_profile->state == "TO") { echo "selected"; } ?>>Tocantins</option>
<option value="AP" <?php if($my_station_profile->state == "AP") { echo "selected"; } ?>>Amapá</option>
<option value="PB" <?php if($my_station_profile->state == "PB") { echo "selected"; } ?>>Paraíba</option>
<option value="MA" <?php if($my_station_profile->state == "MA") { echo "selected"; } ?>>Maranhão</option>
<option value="RN" <?php if($my_station_profile->state == "RN") { echo "selected"; } ?>>Rio Grande do Norte</option>
<option value="PI" <?php if($my_station_profile->state == "PI") { echo "selected"; } ?>>Piauí</option>
<option value="DF" <?php if($my_station_profile->state == "DF") { echo "selected"; } ?>>Distrito Federal (Brasília)</option>
<option value="CE" <?php if($my_station_profile->state == "CE") { echo "selected"; } ?>>Ceará</option>
<option value="AC" <?php if($my_station_profile->state == "AC") { echo "selected"; } ?>>Acre</option>
<option value="MS" <?php if($my_station_profile->state == "MS") { echo "selected"; } ?>>Mato Grosso do Sul</option>
<option value="RR" <?php if($my_station_profile->state == "RR") { echo "selected"; } ?>>Roraima</option>
<option value="RO" <?php if($my_station_profile->state == "RO") { echo "selected"; } ?>>Rondônia</option>
<option value="RJ" <?php if($my_station_profile->state == "RJ") { echo "selected"; } ?>>Rio de Janeiro</option>
<option value="SP" <?php if($my_station_profile->state == "SP") { echo "selected"; } ?>>São Paulo</option>
<option value="RS" <?php if($my_station_profile->state == "RS") { echo "selected"; } ?>>Rio Grande do Sul</option>
<option value="MG" <?php if($my_station_profile->state == "MG") { echo "selected"; } ?>>Minas Gerais</option>
<option value="PR" <?php if($my_station_profile->state == "PR") { echo "selected"; } ?>>Paraná</option>
<option value="BA" <?php if($my_station_profile->state == "BA") { echo "selected"; } ?>>Bahia</option>
<option value="PE" <?php if($my_station_profile->state == "PE") { echo "selected"; } ?>>Pernambuco</option>
<option value="PA" <?php if($my_station_profile->state == "PA") { echo "selected"; } ?>>Pará</option>
<option value="MT" <?php if($my_station_profile->state == "MT") { echo "selected"; } ?>>Mato Grosso</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">

Wyświetl plik

@ -16,6 +16,7 @@ $(document).ready( function () {
$("#mexico_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
var selectedDXCCID = $('#dxcc_select').find(":selected").val();
@ -28,6 +29,7 @@ $(document).ready( function () {
$("#aland_state").hide();
$("#mexico_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
// Show Aland States if Aland is selected
@ -40,6 +42,7 @@ $(document).ready( function () {
$("#belarus_state").hide();
$("#mexico_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
// Show Asiatic Russia States if Asiatic Russia is selected
@ -52,6 +55,7 @@ $(document).ready( function () {
$("#belarus_state").hide();
$("#mexico_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
// Show Belarus States if Belarus is selected
@ -64,6 +68,7 @@ $(document).ready( function () {
$("#eu_russia_state").hide();
$("#mexico_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
// Show Mexico States if Mexico is selected
@ -76,6 +81,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
// Show EU Russia States if EU Russia is selected
@ -88,6 +94,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").show();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
// Show Argentina States if Argentina is selected
@ -100,10 +107,24 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").show();
$("#brazil_state").hide();
}
// Show Brazil States if Brazil is selected
if(selectedDXCCID == '108'){
$("#mexico_state").hide();
$("#belarus_state").hide();
$("#asiatic_russia_state").hide();
$("#aland_state").hide();
$("#canada_state").hide();
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").show();
}
$('#dxcc_select').change(function(){
if($(this).val() == '1'){ // or this.value == 'volvo'
if($(this).val() == '1'){
$("#mexico_state").hide();
$("#belarus_state").hide();
$("#asiatic_russia_state").hide();
@ -112,6 +133,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
} else if($(this).val() == '5') {
$("#mexico_state").hide();
$("#belarus_state").hide();
@ -121,6 +143,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
} else if($(this).val() == '15') {
$("#mexico_state").hide();
$("#belarus_state").hide();
@ -130,6 +153,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
} else if($(this).val() == '27') {
$("#mexico_state").hide();
$("#belarus_state").show();
@ -139,6 +163,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
} else if($(this).val() == '50') {
$("#mexico_state").show();
$("#belarus_state").hide();
@ -148,6 +173,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
} else if($(this).val() == '54') {
$("#mexico_state").hide();
$("#belarus_state").hide();
@ -157,6 +183,7 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").show();
$("#argentina_state").hide();
$("#brazil_state").hide();
} else if($(this).val() == '100') {
$("#mexico_state").hide();
$("#belarus_state").hide();
@ -166,9 +193,27 @@ $(document).ready( function () {
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").show();
$("#brazil_state").hide();
} else if($(this).val() == '108') {
$("#mexico_state").hide();
$("#belarus_state").hide();
$("#asiatic_russia_state").hide();
$("#aland_state").hide();
$("#canada_state").hide();
$("#us_state").hide();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").show();
} else {
$("#mexico_state").hide();
$("#belarus_state").hide();
$("#asiatic_russia_state").hide();
$("#aland_state").hide();
$("#canada_state").hide();
$("#us_state").show();
$("#eu_russia_state").hide();
$("#argentina_state").hide();
$("#brazil_state").hide();
}
});
} );