2011-12-04 15:15:27 +00:00
|
|
|
module SimpleForm
|
|
|
|
module Components
|
|
|
|
module HTML5
|
|
|
|
def initialize(*)
|
|
|
|
@html5 = false
|
|
|
|
end
|
|
|
|
|
|
|
|
def html5
|
|
|
|
@html5 = true
|
2011-12-05 09:44:02 +00:00
|
|
|
input_html_options[:required] = true if has_required?
|
|
|
|
nil
|
2011-12-04 15:15:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def html5?
|
|
|
|
@html5
|
|
|
|
end
|
2011-12-05 09:44:02 +00:00
|
|
|
|
|
|
|
def has_required?
|
|
|
|
required_field?
|
|
|
|
end
|
2011-12-04 15:15:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|