From 9636882c1e890c7d6dda6b974b9765bebe3f880a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 9 Dec 2011 18:15:55 +0000 Subject: Use #labelled_form_for instead of #labelled_tabular_form_for. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8141 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 1 + app/views/custom_fields/_form.html.erb | 4 ++-- app/views/custom_fields/edit.html.erb | 2 +- app/views/custom_fields/new.html.erb | 2 +- app/views/issue_categories/_form.html.erb | 2 +- app/views/issue_categories/edit.html.erb | 2 +- app/views/issue_categories/new.html.erb | 2 +- app/views/news/edit.html.erb | 2 +- app/views/news/index.html.erb | 2 +- app/views/news/new.html.erb | 2 +- app/views/news/show.html.erb | 2 +- app/views/projects/_edit.html.erb | 2 +- app/views/projects/_form.html.erb | 8 ++++---- app/views/projects/copy.html.erb | 4 ++-- app/views/projects/new.html.erb | 2 +- app/views/roles/_form.html.erb | 4 ++-- app/views/roles/edit.html.erb | 2 +- app/views/roles/new.html.erb | 2 +- app/views/timelog/edit.html.erb | 4 ++-- app/views/versions/_form.html.erb | 2 +- app/views/versions/edit.html.erb | 2 +- app/views/versions/new.html.erb | 2 +- app/views/wiki/rename.html.erb | 4 ++-- 23 files changed, 31 insertions(+), 30 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 396319e74..58e1cf8ec 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -866,6 +866,7 @@ module ApplicationHelper end def labelled_tabular_form_for(*args, &proc) + ActiveSupport::Deprecation.warn "ApplicationHelper#labelled_tabular_form_for is deprecated and will be removed in Redmine 1.5. Use #labelled_form_for instead." args << {} unless args.last.is_a?(Hash) options = args.last options[:html] ||= {} diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb index 53e71703d..7432a426f 100644 --- a/app/views/custom_fields/_form.html.erb +++ b/app/views/custom_fields/_form.html.erb @@ -60,7 +60,7 @@ function toggle_custom_field_format() { //]]> -
+

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

<%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :onchange => "toggle_custom_field_format();", :disabled => !@custom_field.new_record? %>

@@ -76,7 +76,7 @@ function toggle_custom_field_format() { <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
-
+
<% case @custom_field.class.name when "IssueCustomField" %> diff --git a/app/views/custom_fields/edit.html.erb b/app/views/custom_fields/edit.html.erb index 8b84ee079..51ac84fcf 100644 --- a/app/views/custom_fields/edit.html.erb +++ b/app/views/custom_fields/edit.html.erb @@ -2,7 +2,7 @@ » <%= link_to l(@custom_field.type_name), :controller => 'custom_fields', :action => 'index', :tab => @custom_field.class.name %> » <%=h @custom_field.name %> -<% labelled_tabular_form_for :custom_field, @custom_field, :url => { :action => "edit", :id => @custom_field } do |f| %> +<% labelled_form_for :custom_field, @custom_field, :url => { :action => "edit", :id => @custom_field } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <% end %> diff --git a/app/views/custom_fields/new.html.erb b/app/views/custom_fields/new.html.erb index 85f6ef53e..a68cef5dd 100644 --- a/app/views/custom_fields/new.html.erb +++ b/app/views/custom_fields/new.html.erb @@ -2,7 +2,7 @@ » <%= link_to l(@custom_field.type_name), :controller => 'custom_fields', :action => 'index', :tab => @custom_field.class.name %> » <%= l(:label_custom_field_new) %> -<% labelled_tabular_form_for :custom_field, @custom_field, :url => { :action => "new" } do |f| %> +<% labelled_form_for :custom_field, @custom_field, :url => { :action => "new" } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= hidden_field_tag 'type', @custom_field.type %> <%= submit_tag l(:button_save) %> diff --git a/app/views/issue_categories/_form.html.erb b/app/views/issue_categories/_form.html.erb index fae0a75e5..c3b20936c 100644 --- a/app/views/issue_categories/_form.html.erb +++ b/app/views/issue_categories/_form.html.erb @@ -1,6 +1,6 @@ <%= error_messages_for 'category' %> -
+

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

<%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %>

diff --git a/app/views/issue_categories/edit.html.erb b/app/views/issue_categories/edit.html.erb index 917429640..4f29ab8f8 100644 --- a/app/views/issue_categories/edit.html.erb +++ b/app/views/issue_categories/edit.html.erb @@ -1,6 +1,6 @@

<%=l(:label_issue_category)%>

-<% labelled_tabular_form_for :issue_category, @category, :url => issue_category_path(@category), :html => {:method => :put} do |f| %> +<% labelled_form_for :issue_category, @category, :url => issue_category_path(@category), :html => {:method => :put} do |f| %> <%= render :partial => 'issue_categories/form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <% end %> diff --git a/app/views/issue_categories/new.html.erb b/app/views/issue_categories/new.html.erb index f99c9b358..e63c09ea9 100644 --- a/app/views/issue_categories/new.html.erb +++ b/app/views/issue_categories/new.html.erb @@ -1,6 +1,6 @@

<%=l(:label_issue_category_new)%>

-<% labelled_tabular_form_for :issue_category, @category, :url => project_issue_categories_path(@project) do |f| %> +<% labelled_form_for :issue_category, @category, :url => project_issue_categories_path(@project) do |f| %> <%= render :partial => 'issue_categories/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <% end %> diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb index 83608f971..182f22fbe 100644 --- a/app/views/news/edit.html.erb +++ b/app/views/news/edit.html.erb @@ -1,6 +1,6 @@

<%=l(:label_news)%>

-<% labelled_tabular_form_for @news, :html => { :id => 'news-form', :method => :put } do |f| %> +<% labelled_form_for @news, :html => { :id => 'news-form', :method => :put } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <%= link_to_remote l(:label_preview), diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index fe8534130..4d13d3a32 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -7,7 +7,7 @@