Sha256: c7f51d6129b28078173c35084ffeb8c638b593659cb2ba6c8d23fc6670d7a693
Contents?: true
Size: 1.13 KB
Versions: 10
Compression:
Stored size: 1.13 KB
Contents
module GOVUKDesignSystemFormBuilder module Containers class RadioButtonsFieldset < Base include Traits::Hint include Traits::Error def initialize(builder, object_name, attribute_name, hint_text:, legend:, inline:, small:, classes:, &block) super(builder, object_name, attribute_name) @inline = inline @small = small @legend = legend @hint_text = hint_text @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::Radios.new(@builder, inline: @inline, 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