X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b3f82d79148184cdb999f9a64f20fce34c3b8dad..7b529ca2c0ee720d6ecb94738f70d9bebb9f2e68:/src/components/UrlSubmitForm.svelte

diff --git a/src/components/UrlSubmitForm.svelte b/src/components/UrlSubmitForm.svelte
index 975e79f..01feea1 100644
--- a/src/components/UrlSubmitForm.svelte
+++ b/src/components/UrlSubmitForm.svelte
@@ -12,6 +12,9 @@
       if (['checkbox', 'radio'].indexOf(field.type) > -1 && !field.checked) return;
       if (typeof field.value === 'undefined' || field.value === '') return;
 
+      // Default value for /search endpoint
+      if (field.name === 'dedupe' && (field.value === 1 || field.value === '1')) return;
+
       params.set(field.name, field.value);
     });
 
@@ -22,7 +25,9 @@
   // doesn't support hidden fields, so we check those in an extra step
   function validate_field(field) {
     if (field.type === 'hidden') {
-      if (field.pattern && !field.value.match(field.pattern)) return false;
+      if (field.value.length) {
+        if (field.pattern && !field.value.match(field.pattern)) return false;
+      }
     }
     return field.checkValidity(); // for hidden field always true
   }
@@ -44,5 +49,7 @@
 </script>
 
 <form on:submit|preventDefault={handle_submit} class="form-inline" role="search" accept-charset="UTF-8" action="">
-  <slot></slot>
+  <div class="row g-2">
+    <slot></slot>
+  </div>
 </form>
