From 005ff4bed551422ecccf830819c2564e160ece72 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 10 Feb 2020 16:44:37 +0100 Subject: [PATCH] form: fix the bottom margin of the siret element --- app/assets/stylesheets/new_design/forms.scss | 7 +++++++ app/views/shared/dossiers/editable_champs/_siret.html.haml | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/new_design/forms.scss b/app/assets/stylesheets/new_design/forms.scss index 4b87c329c..dba44beca 100644 --- a/app/assets/stylesheets/new_design/forms.scss +++ b/app/assets/stylesheets/new_design/forms.scss @@ -335,6 +335,13 @@ } } + .siret-info { + margin-top: -$default-fields-spacer; + margin-bottom: $default-fields-spacer; + // Ensure the bottom-margin is not collapsed when the element is empty + min-height: 1px; + } + .send-wrapper { display: flex; width: 100%; diff --git a/app/views/shared/dossiers/editable_champs/_siret.html.haml b/app/views/shared/dossiers/editable_champs/_siret.html.haml index a2c27ad80..b62efa342 100644 --- a/app/views/shared/dossiers/editable_champs/_siret.html.haml +++ b/app/views/shared/dossiers/editable_champs/_siret.html.haml @@ -1,11 +1,10 @@ = form.text_field :value, placeholder: champ.libelle, - class: 'small-margin', data: { remote: true, debounce: true, url: champs_siret_path(form.index), params: { champ_id: champ&.id }.to_query, spinner: true }, required: champ.mandatory?, pattern: "[0-9]{14}", title: "Le numéro de SIRET doit comporter exactement 14 chiffres" .spinner.right.hidden -%div{ class: "siret-info-#{form.index}" } +.siret-info{ class: "siret-info-#{form.index}" } - if champ.etablissement.present? = render partial: 'shared/dossiers/editable_champs/etablissement_titre', locals: { etablissement: champ.etablissement }