Merge pull request #2361 from int2001/fix_county

Fix county
This commit is contained in:
Joerg (DJ7NT)
2025-09-30 18:33:34 +02:00
committed by GitHub
2 changed files with 3 additions and 31 deletions

View File

@@ -289,7 +289,7 @@ function qso_edit(id) {
case '291':
if (state != "") {
$("#stationCntyInputEdit").prop('disabled', false);
selectize_usa_county('#stateDropdown', '#stationCntyInputEdit');
selectize_usa_county('#stateDropdownEdit', '#stationCntyInputEdit');
}
$('#location_us_county_edit').show();
break;
@@ -607,6 +607,7 @@ function qso_save() {
}
function selectize_usa_county(state_field, county_field) {
$(county_field).selectize()[0].selectize.destroy();
$(county_field).selectize({
delimiter: ';',
maxItems: 1,

View File

@@ -628,36 +628,7 @@ $('#stateDropdown').on('change', function () {
case '110':
case '291':
$("#stationCntyInputQso").prop('disabled', false);
$('#stationCntyInputQso').selectize({
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
valueField: 'name',
labelField: 'name',
searchField: 'name',
options: [],
create: false,
load: function (query, callback) {
var state = $("#stateDropdown option:selected").text();
if (!query || state == "") return callback();
$.ajax({
url: base_url + 'index.php/qso/get_county',
type: 'GET',
dataType: 'json',
data: {
query: query,
state: state,
},
error: function () {
callback();
},
success: function (res) {
callback(res);
}
});
}
});
selectize_usa_county('#stateDropdown', '#stationCntyInputQso');
break;
case '15':
case '54':