Skip to content

Commit

Permalink
Add span.input-group-text wrapper for input group string addons only.
Browse files Browse the repository at this point in the history
  • Loading branch information
donv committed Aug 31, 2023
1 parent e237114 commit 8c0b344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bootstrap_form/helpers/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def prepend_and_append_input(name, options, &block)
input = attach_input(options, :prepend) + input + attach_input(options, :append)
input << generate_error(name)
options.present? &&
input = tag.div(input, class: ["input-group", options[:input_group_class]].compact)
(input = tag.div(input, class: ["input-group", options[:input_group_class]].compact))
input
end

Expand All @@ -78,7 +78,7 @@ def input_with_error(name, &block)
end

def input_group_content(content)
return content if content.include?("btn")
return content if content.strip.start_with?("<")

tag.span(content, class: "input-group-text")
end
Expand Down

0 comments on commit 8c0b344

Please sign in to comment.