Sha256: d0c3d815cd28233c22646e0be650d8e5e85bf993dd7a59ffe2b3a35837ef4cc2

Contents?: true

Size: 460 Bytes

Versions: 7

Compression:

Stored size: 460 Bytes

Contents

require 'bh/core_ext/rails/form/base_helper'

module Bh
  module Form
    module LegendHelper
      include BaseHelper

      def legend(value, options = {})
        append_class! options, 'sr-only' if inline_form?
        text = content_tag :legend, value, options
        text = content_tag :div, text, class: 'col-sm-12' if horizontal_form?
        text = label_and_field_container(text, :legend) unless inline_form?
        text
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bh-1.3.6 lib/bh/core_ext/rails/form/legend_helper.rb
bh-1.3.5 lib/bh/core_ext/rails/form/legend_helper.rb
bh-1.3.4 lib/bh/core_ext/rails/form/legend_helper.rb
bh-1.3.3 lib/bh/core_ext/rails/form/legend_helper.rb
bh-1.3.1 lib/bh/core_ext/rails/form/legend_helper.rb
bh-1.3.0 lib/bh/core_ext/rails/form/legend_helper.rb
bh-1.2.0 lib/bh/core_ext/rails/form/legend_helper.rb