From 9bea382d3e2919d91305e895ade94d6cd2ef07cf Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 21 Jan 2025 08:24:58 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Add=20default=20for=20simp?= =?UTF-8?q?le=20form=20wrappers=20inline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will adjust the wrappers (inline) default styling to make the elements look like they're not squished. Which was particularly affecting the lease forms. --- config/initializers/simple_form.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index 8b07d836e..d4c5df209 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -186,4 +186,12 @@ end end end + + config.wrappers :inline, tag: 'span', class: 'form-group inline', error_class: 'has-error' do |b| + b.use :html5 + b.use :placeholder + b.use :label, class: 'control-label mr-1' + b.use :input, class: 'form-control mr-1' + b.use :error, wrap_with: { tag: 'span', class: 'help-block' } + end end