Skip to content

Commit b568837

Browse files
committed
Vertically align radio buttons
1 parent 7318cb6 commit b568837

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

app/views/proposals/_form.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
= f.input :pitch, input_html: { class: 'watched', rows: 5 }, hint: 'Explain why this talk should be considered and what makes you qualified to speak on the topic.'
3535

3636
= f.input :spoken_language, as: :radio_buttons, wrapper: 'vertical_radio_and_checkboxes', input_html: { class: 'watched' }, collection: ['EN', 'JA'],
37+
collection_wrapper_tag: nil, item_wrapper_tag: :div, item_wrapper_class: 'radio',
3738
hint: 'In which language would you speak?'
3839

3940
- unless event.custom_fields.empty?

config/initializers/simple_form_bootstrap.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@
5353
b.use :placeholder
5454
b.optional :tooltip
5555
b.optional :popover_icon
56-
b.use :label_input
56+
b.use :label, class: 'control-label'
57+
58+
b.wrapper tag: 'div' do |ba|
59+
ba.use :input
60+
end
5761

5862
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
5963
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }

0 commit comments

Comments
 (0)