X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7be7417b5bf8ee801295d402e736c531892b77ca..8201c7f46cbb253fe5f502bc4c398c5133f01bfe:/website/js/nominatim-ui.js diff --git a/website/js/nominatim-ui.js b/website/js/nominatim-ui.js index 9c8dee55..72c1b3b0 100644 --- a/website/js/nominatim-ui.js +++ b/website/js/nominatim-ui.js @@ -31,14 +31,24 @@ jQuery(document).ready(function(){ if (query_val == "simple") { $("div.form-group-structured").hide(); $("div.form-group-simple").show(); + $("div.form-group-structured .form-control").prop('disabled', true); + $("div.form-group-simple .form-control").prop('disabled', false); $('.form-group-structured').find('input:text').val(''); } else if (query_val == "structured") { $("div.form-group-simple").hide(); $("div.form-group-structured").show(); + $("div.form-group-structured .form-control").prop('disabled', false); + $("div.form-group-simple .form-control").prop('disabled', true); $('.form-group-simple').find('input:text').val(''); } }); + + if (nominatim_structured_query) { + $('input#structured').prop('checked', true).trigger('click'); + } else { + $('input#simple').prop('checked', true).trigger('click'); + } }); map = new L.map('map', {