From 9d7066d3c38b710cedb8dbfe36ab495a169106bf Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Wed, 2 Aug 2017 15:30:42 +0200 Subject: [PATCH] Form: display mandatory star in red --- app/assets/stylesheets/new_design/forms.scss | 4 ++++ .../new_gestionnaire/dossiers/champs/_champ_label.html.haml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/new_design/forms.scss b/app/assets/stylesheets/new_design/forms.scss index 9b5c7bc72..759b8b643 100644 --- a/app/assets/stylesheets/new_design/forms.scss +++ b/app/assets/stylesheets/new_design/forms.scss @@ -11,6 +11,10 @@ margin-bottom: $default-padding; display: block; + .mandatory { + color: $dark-red; + } + .notice { font-size: 14px; display: block; diff --git a/app/views/new_gestionnaire/dossiers/champs/_champ_label.html.haml b/app/views/new_gestionnaire/dossiers/champs/_champ_label.html.haml index b6dc5e579..000439a3a 100644 --- a/app/views/new_gestionnaire/dossiers/champs/_champ_label.html.haml +++ b/app/views/new_gestionnaire/dossiers/champs/_champ_label.html.haml @@ -1,4 +1,6 @@ = form.label :value do - #{champ.libelle} #{champ.mandatory ? '*' : nil} + #{champ.libelle} + - if champ.mandatory + %span.mandatory * - if champ.description.present? %span.notice= champ.description