Form: display mandatory star in red

This commit is contained in:
Simon Lehericey 2017-08-02 15:30:42 +02:00 committed by Mathieu Magnin
parent 46c144146c
commit 9d7066d3c3
2 changed files with 7 additions and 1 deletions

View file

@ -11,6 +11,10 @@
margin-bottom: $default-padding;
display: block;
.mandatory {
color: $dark-red;
}
.notice {
font-size: 14px;
display: block;

View file

@ -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