form: make the radio button larger and hoverable

As a bonus, the implementation of vertical radio buttons is now closer
from the default horizontal one.
This commit is contained in:
Pierre de La Morinerie 2020-02-10 18:16:00 +00:00
parent f42977e40a
commit 1531b69f5a
3 changed files with 71 additions and 34 deletions

View file

@ -52,16 +52,16 @@
%label Mot de passe
%input{ type: "password", value: "12345678" }
%h2.header-section Bouton radio verticaux
.editable-champ.editable-champ-radio.vertical
= f.label :archived, 'Option A', value: true
%p.notice Une option tout à fait valable.
= f.radio_button :archived, true
.editable-champ.editable-champ-radio.vertical
= f.label :archived, 'Option B', value: false
%p.notice Une autre option, pas mal non plus.
= f.radio_button :archived, false
%h3.header-subsection Bouton radio verticaux
.radios.vertical
= f.label :archived, value: true do
= f.radio_button :archived, true
Option A
%p.notice Une option tout à fait valable.
= f.label :archived, value: false do
= f.radio_button :archived, false
Option B
%p.notice Une autre option, pas mal non plus.
.send-wrapper
= f.submit 'Enregistrer un brouillon (formnovalidate)', formnovalidate: true, class: 'button send'