Sha256: 99371dc0f9170ffb80bc331a5b16d40355f4fb73098174eea12cc1002c5e056e
Contents?: true
Size: 1.08 KB
Versions: 10
Compression:
Stored size: 1.08 KB
Contents
module GOVUKDesignSystemFormBuilder module Containers class CheckBoxesFieldset < Base include Traits::Error include Traits::Hint def initialize(builder, object_name, attribute_name, hint_text:, legend:, small:, classes:, &block) super(builder, object_name, attribute_name, &block) @legend = legend @hint_text = hint_text @small = small @classes = classes @block_content = capture { block.call } end def html Containers::FormGroup.new(@builder, @object_name, @attribute_name).html do Containers::Fieldset.new(@builder, @object_name, @attribute_name, legend: @legend, described_by: [error_element.error_id, hint_element.hint_id]).html do safe_join( [ hint_element.html, error_element.html, Containers::CheckBoxes.new(@builder, small: @small, classes: @classes).html do @block_content end ] ) end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems