Skip to content

Commit

Permalink
Merge pull request #183 from sciencehistory/bootstrap5
Browse files Browse the repository at this point in the history
fix repeatable_attr_input for bootstrap 5
  • Loading branch information
jrochkind authored Nov 7, 2024
2 parents 5288623 + 92f525c commit e88c09e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Fixed

*
* Fix repeatable_attr_input for Bootstrap 5.x. https://github.com/sciencehistory/kithe/pull/183

*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ def repeatable_thing_class
# Wraps with the proper DOM for cocooon JS, along with the remove button.
# @yield pass block with content to wrap
def wrap_with_repeatable_ui
# cocoon JS wants "nested-fields"
template.content_tag(:div, class: "nested-fields form-row") do
# * cocoon JS wants "nested-fields"
# * 'row' and `g-3 are for bootstrap 5 -- but doens't mess up bootstrap 4 because
# conveniently the 'form-row' ends up taking precedence.
# * form-row is for bootstrap 4. Doesn't exist in bootstrap 5.
template.content_tag(:div, class: "nested-fields form-row row g-3") do
template.content_tag(:div, class: "col") do
yield
end +
Expand Down

0 comments on commit e88c09e

Please sign in to comment.