2010-01-09 15:05:02 +00:00
|
|
|
module SimpleForm
|
|
|
|
module Components
|
|
|
|
module Hints
|
|
|
|
def hint
|
|
|
|
template.content_tag(hint_tag, hint_text, hint_html_options) unless hint_text.blank?
|
|
|
|
end
|
|
|
|
|
|
|
|
def hint_tag
|
|
|
|
options[:hint_tag] || SimpleForm.hint_tag
|
|
|
|
end
|
|
|
|
|
|
|
|
def hint_text
|
|
|
|
@hint_text ||= options[:hint] || translate(:hints)
|
|
|
|
end
|
|
|
|
|
|
|
|
def hint_html_options
|
2010-06-01 21:37:53 +00:00
|
|
|
html_options_for(:hint, [:hint])
|
2010-01-09 15:05:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|