Make it possible to override required value that was set in the wrapper.
This commit is contained in:
parent
709f3e58c6
commit
a280ba770f
|
@ -7,10 +7,10 @@ module SimpleForm
|
|||
|
||||
def html5(wrapper_options = nil)
|
||||
@html5 = true
|
||||
if has_required?
|
||||
input_html_options[:required] = true
|
||||
input_html_options[:'aria-required'] = true
|
||||
end
|
||||
|
||||
input_html_options[:required] = has_required?
|
||||
input_html_options[:'aria-required'] = has_required? || nil
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ class RequiredTest < ActionView::TestCase
|
|||
concat f.input :name, required: false
|
||||
end
|
||||
assert_no_select 'input[type=text][required]'
|
||||
assert_no_select 'input[type=text][aria-required]'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue