[Station profile] Fix when editing a station profile with US County set. If state was set, county could not be changed.

这个提交包含在:
Andreas 2021-03-14 17:30:36 +01:00
父节点 396b3ae90d
当前提交 616eb0e09b

查看文件

@ -1971,11 +1971,26 @@ function deleteQsl(id) {
<?php if ($this->uri->segment(1) == "station") { ?>
<script>
var baseURL= "<?php echo base_url();?>";
var state = $("#StateHelp option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
station_profile_selectize_usa_county();
}
$('#StateHelp').change(function(){
var state = $("#StateHelp option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
station_profile_selectize_usa_county();
} else {
$("#stationCntyInput").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInput").val("");
}
});
function station_profile_selectize_usa_county() {
$('#stationCntyInput').selectize({
maxItems: 1,
closeAfterSelect: true,
@ -2006,13 +2021,7 @@ function deleteQsl(id) {
});
}
});
} else {
$("#stationCntyInput").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInput").val("");
}
});
</script>
<?php } ?>