X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a5e37858438a181d6d69b82057833231ff067c81..36007091166cdf30b1593f8a1d6c7673ef8ca45e:/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', {