]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/js/nominatim-ui.js
make sure that all postcodes have an entry in word
[nominatim.git] / website / js / nominatim-ui.js
index 9c8dee55048d1387da883e3a7c354f4d409adf6a..72c1b3b054d6fd5236e7cedeac9f0dd8396408ee 100644 (file)
@@ -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', {