From 1f132c9918e8cc5af1e85f0ef6da83f56c20ef3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Reuiller?= Date: Thu, 28 Nov 2024 16:53:57 +0100 Subject: [PATCH] remove semantic search tab --- lemarche/templates/siaes/search_results.html | 65 +------------------- lemarche/www/siaes/forms.py | 31 ---------- lemarche/www/siaes/tests.py | 61 ------------------ 3 files changed, 1 insertion(+), 156 deletions(-) diff --git a/lemarche/templates/siaes/search_results.html b/lemarche/templates/siaes/search_results.html index d2752f856..1d83c7c4d 100644 --- a/lemarche/templates/siaes/search_results.html +++ b/lemarche/templates/siaes/search_results.html @@ -33,17 +33,6 @@ aria-selected="false" aria-controls="search-text">Recherche par SIRET / nom -
  • - -
  • -
    - -
    @@ -299,9 +251,6 @@

    let searchTextContent = document.getElementById('search-text'); let qInput = document.getElementById('id_q'); - let searchSemanticContent = document.getElementById('search-semantic'); - let semanticqInput = document.getElementById('id_semantic_q'); - let resetBtn = document.getElementById('form-reset-btn'); if (resetBtn) { @@ -309,11 +258,7 @@

    } // init search form - if (semanticqInput.value) { - setTimeout(() => { - dsfr(searchSemanticContent).tabPanel.disclose(); - }, 500); - } else if (qInput.value) { + if (qInput.value) { setTimeout(() => { dsfr(searchTextContent).tabPanel.disclose(); }, 500); @@ -331,14 +276,6 @@

    const locationsAutoComplete = new PerimetersMultiAutocomplete(LOCATION_AUTOCOMPLETE_ID, LOCATION_AUTOCOMPLETE_CONTAINER_SELECTOR, LOCATION_SELECTED_CONTAINER_SELECTOR, LOCATION_HIDDEN_INPUT_SELECTOR_PREFIX, LOCATION_CURRENT_ID); locationsAutoComplete.init(); {% endif %} - - // init city form fields - const cityAutoComplete = new PerimeterAutocomplete("dir_form_semantic_city", "id_semantic_city", "Ville", "CITY"); - cityAutoComplete.init(); - cityInput = document.getElementById('dir_form_semantic_city').querySelector('input') - cityInput.classList.remove("autocomplete__input") - cityInput.classList.remove("autocomplete__input--default") - cityInput.classList.add("fr-input"); });