mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-23 18:57:12 +00:00
Disable cnty edit field without state filled, reset cnty on reset_fields
This commit is contained in:
@@ -363,7 +363,11 @@ function qso_edit(id) {
|
||||
case '29':
|
||||
case '32':
|
||||
case '281':
|
||||
$("#stationCntyInputEdit").prop('disabled', false);
|
||||
if (state != "") {
|
||||
$("#stationCntyInputEdit").prop('disabled', false);
|
||||
} else {
|
||||
$("#stationCntyInputEdit").prop('disabled', true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -680,12 +684,13 @@ async function updateStateDropdown(dxcc_field, state_label, county_div, county_i
|
||||
case '32':
|
||||
case '281':
|
||||
$(county_div).find('.form-control').show();
|
||||
$(county_div).find('.form-control').prop('disabled', true);
|
||||
$(county_div).find('.selectize-control').hide();
|
||||
$(county_div).show();
|
||||
break;
|
||||
default:
|
||||
$(county_div).hide();
|
||||
$(county_input).val();
|
||||
$(county_input).val('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -735,6 +735,7 @@ function reset_fields() {
|
||||
var $select = $('#darc_dok').selectize();
|
||||
var selectize = $select[0].selectize;
|
||||
selectize.clear();
|
||||
$('#stationCntyInputQso').val("");
|
||||
$select = $('#stationCntyInputQso').selectize();
|
||||
selectize = $select[0].selectize;
|
||||
selectize.clear();
|
||||
@@ -1057,7 +1058,12 @@ $("#callsign").on("focusout", function () {
|
||||
case '29':
|
||||
case '32':
|
||||
case '281':
|
||||
$("#stationCntyInputQso").prop('disabled', false);
|
||||
if (result.callsign_state == "") {
|
||||
$("#stationCntyInputQso").prop('disabled', true);
|
||||
} else {
|
||||
$("#stationCntyInputQso").prop('disabled', false);
|
||||
$("#stationCntyInputQso").val(result.callsign_us_county);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$("#stationCntyInputQso").prop('disabled', false);
|
||||
|
||||
Reference in New Issue
Block a user