Removed TabularFormBuilder references in views.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8142 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-09 18:40:28 +00:00
parent 9636882c1e
commit ede9a03405
13 changed files with 28 additions and 20 deletions

View File

@ -882,6 +882,20 @@ module ApplicationHelper
form_for(*args, &proc)
end
def labelled_fields_for(*args, &proc)
args << {} unless args.last.is_a?(Hash)
options = args.last
options.merge!({:builder => TabularFormBuilder})
fields_for(*args, &proc)
end
def labelled_remote_form_for(*args, &proc)
args << {} unless args.last.is_a?(Hash)
options = args.last
options.merge!({:builder => TabularFormBuilder})
remote_form_for(*args, &proc)
end
def back_url_hidden_field_tag
back_url = params[:back_url] || request.env['HTTP_REFERER']
back_url = CGI.unescape(back_url.to_s)

View File

@ -1,6 +1,6 @@
<h2><%= link_to l(:label_issue_status_plural), issue_statuses_path %> &#187; <%=h @issue_status %></h2>
<% form_for @issue_status, :builder => TabularFormBuilder do |f| %>
<% labelled_form_for @issue_status do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_save) %>
<% end %>

View File

@ -1,6 +1,6 @@
<h2><%= link_to l(:label_issue_status_plural), issue_statuses_path %> &#187; <%=l(:label_issue_status_new)%></h2>
<% form_for @issue_status, :builder => TabularFormBuilder do |f| %>
<% labelled_form_for @issue_status do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_create) %>
<% end %>

View File

@ -1,4 +1,4 @@
<% fields_for :issue, @issue, :builder => TabularFormBuilder do |f| %>
<% labelled_fields_for :issue, @issue do |f| %>
<div class="splitcontentleft">
<% if @issue.new_record? || @allowed_statuses.any? %>

View File

@ -8,7 +8,7 @@
<% end %>
<% if User.current.allowed_to?(:log_time, @project) %>
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
<% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
<% labelled_fields_for :time_entry, @time_entry do |time_entry| %>
<div class="splitcontentleft">
<p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
</div>

View File

@ -6,9 +6,7 @@
<h2><%=l(:label_my_account)%></h2>
<%= error_messages_for 'user' %>
<% form_for :user, @user, :url => { :action => "account" },
:builder => TabularFormBuilder,
:lang => current_language,
<% labelled_form_for :user, @user, :url => { :action => "account" },
:html => { :id => 'my_account_form' } do |f| %>
<div class="splitcontentleft">
<fieldset class="box tabular">

View File

@ -1,7 +1,5 @@
<% remote_form_for :repository, @repository,
:url => { :controller => 'repositories', :action => 'edit', :id => @project },
:builder => TabularFormBuilder,
:lang => current_language do |f| %>
<% labelled_remote_form_for :repository, @repository,
:url => { :controller => 'repositories', :action => 'edit', :id => @project } do |f| %>
<%= error_messages_for 'repository' %>

View File

@ -1,7 +1,5 @@
<% remote_form_for :wiki, @wiki,
:url => { :controller => 'wikis', :action => 'edit', :id => @project },
:builder => TabularFormBuilder,
:lang => current_language do |f| %>
<% labelled_remote_form_for :wiki, @wiki,
:url => { :controller => 'wikis', :action => 'edit', :id => @project } do |f| %>
<%= error_messages_for 'wiki' %>

View File

@ -1,5 +1,5 @@
<h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%=h @tracker %></h2>
<% form_for @tracker, :builder => TabularFormBuilder do |f| %>
<% labelled_form_for @tracker do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% end %>

View File

@ -1,5 +1,5 @@
<h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%=l(:label_tracker_new)%></h2>
<% form_for @tracker, :builder => TabularFormBuilder do |f| %>
<% labelled_form_for @tracker do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% end %>

View File

@ -1,4 +1,4 @@
<% form_for @user, :builder => TabularFormBuilder do |f| %>
<% labelled_form_for @user do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% if @user.active? && email_delivery_enabled? -%>
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>

View File

@ -1,4 +1,4 @@
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
<% labelled_fields_for :pref, @user.pref do |pref_fields| %>
<p><%= pref_fields.check_box :hide_mail %></p>
<p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
<p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>

View File

@ -1,6 +1,6 @@
<h2><%= link_to l(:label_user_plural), users_path %> &#187; <%=l(:label_user_new)%></h2>
<% form_for @user, :builder => TabularFormBuilder do |f| %>
<% labelled_form_for @user do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<% if email_delivery_enabled? %>
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>