10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/inputs/radio_as_accessible_input.rb', line 10
def input
input_options[:collection_wrapper_tag] ||= options.fetch(:collection_wrapper_tag, SimpleForm.collection_wrapper_tag)
label_method, value_method = detect_collection_methods
input_dom = @builder.send(:"collection_#{input_type}_buttons",
attribute_name, collection,
value_method, label_method,
input_options, input_html_options)
if input_options[:required]
fieldset = "<fieldset class='radio_buttons normal required' aria-required='true'>"
else
fieldset = "<fieldset class='radio_buttons normal'>"
end
dom = " \#{fieldset}\n <legend>\#{input_options[:label]}</legend>\n <div class='options'>\n \#{input_dom}\n </div>\n </fieldset>\n STRING\n dom.html_safe\nend\n"
|