Form: remove form overflow to improve box shadow on input error

This commit is contained in:
Simon Lehericey 2017-07-26 12:41:58 +02:00 committed by Mathieu Magnin
parent 2fd486c1a3
commit 80023e4f7f
3 changed files with 11 additions and 8 deletions

View file

@ -2,8 +2,6 @@
@import "colors"; @import "colors";
.form { .form {
overflow: hidden;
h1 { h1 {
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
@ -147,8 +145,11 @@
margin-bottom: 2 * $default-padding; margin-bottom: 2 * $default-padding;
} }
.send-wrapper {
text-align: right;
.send { .send {
float: right;
margin-bottom: $default-padding; margin-bottom: $default-padding;
} }
} }
}

View file

@ -17,4 +17,5 @@
= form_for(Commentaire.new, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f| = form_for(Commentaire.new, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f|
= f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true = f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true
.send-wrapper
= f.submit 'Envoyer', class: 'button send' = f.submit 'Envoyer', class: 'button send'

View file

@ -6,8 +6,9 @@
- @all_champs.each do |champ| - @all_champs.each do |champ|
= render partial: "new_gestionnaire/dossiers/champs/#{champ.type_champ}", locals: { champ: champ } = render partial: "new_gestionnaire/dossiers/champs/#{champ.type_champ}", locals: { champ: champ }
%input{ type: "password", value: "12345678" } %input{ type: "password", value: "12345678" }
%input.button.send{ type: "submit", value: "Envoyer" } .send-wrapper
%input.button.send{ type: "submit", value: "Enregistrer un brouillon (formnovalidate)", formnovalidate: true } %input.button.send{ type: "submit", value: "Enregistrer un brouillon (formnovalidate)", formnovalidate: true }
%input.button.send{ type: "submit", value: "Envoyer" }
%h1 Boutons %h1 Boutons