|
|
@ -24,8 +24,8 @@ module ApplicationHelper |
|
|
|
|
|
|
|
|
|
|
|
messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join |
|
|
|
messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join |
|
|
|
sentence = I18n.t("errors.messages.not_saved", |
|
|
|
sentence = I18n.t("errors.messages.not_saved", |
|
|
|
:count => resource.errors.count, |
|
|
|
:count => resource.errors.count, |
|
|
|
:resource => resource.class.model_name.human.downcase) |
|
|
|
:resource => resource.class.model_name.human.downcase) |
|
|
|
|
|
|
|
|
|
|
|
html = <<-HTML |
|
|
|
html = <<-HTML |
|
|
|
<div id="error_explanation"> |
|
|
|
<div id="error_explanation"> |
|
|
@ -37,4 +37,10 @@ module ApplicationHelper |
|
|
|
html.html_safe |
|
|
|
html.html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def honeypot |
|
|
|
|
|
|
|
content_tag('div', :style => 'position: absolute; left: -2000px;') do |
|
|
|
|
|
|
|
text_field_tag("#{Settings.honeypot}", nil, :tabindex => 900) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|