Sha256: 46d0260fd859a76110fd876b50c223dbd1ac95c8e9f6e520b36d9708e61821c7
Contents?: true
Size: 949 Bytes
Versions: 6
Compression:
Stored size: 949 Bytes
Contents
module GOVUKDesignSystemFormBuilder module Elements module Radios class FieldsetRadioButton < Base include Traits::Label include Traits::Hint include Traits::HTMLAttributes include Traits::FieldsetItem def initialize(builder, object_name, attribute_name, value, label:, hint:, link_errors:, **kwargs, &block) super(builder, object_name, attribute_name) @value = value @label = label @hint = hint @link_errors = has_errors? && link_errors @html_attributes = kwargs conditional_content(&block) end private def input_type :radios end def input @builder.radio_button(@attribute_name, @value, **attributes(@html_attributes)) end def fieldset_options { radio: true } end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems