fix(banner): not closed form tag broke JS

This commit is contained in:
Colin Darie 2024-03-27 11:03:09 +01:00
parent 2ea45d5dba
commit d5515fca33
No known key found for this signature in database
GPG key ID: 8C76CADD40253590

View file

@ -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();
});