Skip to content

Commit

Permalink
proper bs4 markup for category form
Browse files Browse the repository at this point in the history
  • Loading branch information
GBH committed Nov 30, 2017
1 parent ebe0091 commit 90a027d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/views/comfy/admin/cms/categories/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
- categories.each do |category|
- name = "#{object.class.to_s.demodulize.underscore.downcase}[category_ids][#{category.id}]"
= hidden_field_tag name, 0, id: nil
%label.checkbox-inline
- name = "#{object.class.to_s.demodulize.underscore.downcase}[category_ids][#{category.id}]"
= check_box_tag name, 1, object.categories.member?(category), id: nil
= category.label
.form-check.form-check-inline
%label.form-check-label
- name = "#{object.class.to_s.demodulize.underscore.downcase}[category_ids][#{category.id}]"
= check_box_tag name, 1, object.categories.member?(category), id: nil, class: 'form-check-input'
= category.label

0 comments on commit 90a027d

Please sign in to comment.