From 7c568cccafeb2f1577349419f758478362bf3c97 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 26 Feb 2012 18:07:13 +0000 Subject: Adds a helper for displaying validation error messages. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9017 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/boards/_form.html.erb | 2 +- app/views/documents/_form.html.erb | 2 +- app/views/groups/_form.html.erb | 2 +- app/views/news/_form.html.erb | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/boards/_form.html.erb b/app/views/boards/_form.html.erb index d80c84717..736028bb1 100644 --- a/app/views/boards/_form.html.erb +++ b/app/views/boards/_form.html.erb @@ -1,4 +1,4 @@ -<%= f.error_messages %> +<%= error_messages_for @board %>

<%= f.text_field :name, :required => true %>

diff --git a/app/views/documents/_form.html.erb b/app/views/documents/_form.html.erb index b5b5fa410..53d8fc3bb 100644 --- a/app/views/documents/_form.html.erb +++ b/app/views/documents/_form.html.erb @@ -1,4 +1,4 @@ -<%= f.error_messages %> +<%= error_messages_for @document %>

<%= f.select :category_id, DocumentCategory.active.collect {|c| [c.name, c.id]} %>

diff --git a/app/views/groups/_form.html.erb b/app/views/groups/_form.html.erb index aab2a073e..bca919b39 100644 --- a/app/views/groups/_form.html.erb +++ b/app/views/groups/_form.html.erb @@ -1,4 +1,4 @@ -<%= f.error_messages %> +<%= error_messages_for @group %>

<%= f.text_field :lastname, :label => :field_name %>

diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb index a0d2167a9..ad28e12b2 100644 --- a/app/views/news/_form.html.erb +++ b/app/views/news/_form.html.erb @@ -1,4 +1,5 @@ -<%= f.error_messages %> +<%= error_messages_for @news %> +

<%= f.text_field :title, :required => true, :size => 60 %>

<%= f.text_area :summary, :cols => 60, :rows => 2 %>

-- cgit v1.2.3