From d5515fca3349b289d20a40d44d94ef3e43fa2a0a Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 27 Mar 2024 11:03:09 +0100 Subject: [PATCH] fix(banner): not closed form tag broke JS --- .../switch_domain_banner_component.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/components/switch_domain_banner_component/switch_domain_banner_component.html.haml b/app/components/switch_domain_banner_component/switch_domain_banner_component.html.haml index 2c97a8344..3e65e317e 100644 --- a/app/components/switch_domain_banner_component/switch_domain_banner_component.html.haml +++ b/app/components/switch_domain_banner_component/switch_domain_banner_component.html.haml @@ -27,8 +27,8 @@ %span#banner_auto_switch_error.hidden= t(".detected_error") - if user && !user.preferred_domain_demarches_gouv_fr? && requested_from_new_domain? - = form_tag(helpers.preferred_domain_path, method: :patch, remote: true, name: "update-preferred-domain") - :javascript - document.addEventListener('noticeClosed', function(e) { - document.forms['update-preferred-domain'].submit(); - }); + = form_tag(helpers.preferred_domain_path, method: :patch, remote: true, name: "update-preferred-domain") do + :javascript + document.addEventListener('noticeClosed', function(e) { + document.forms['update-preferred-domain'].submit(); + });