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:
parent
9636882c1e
commit
ede9a03405
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h2><%= link_to l(:label_issue_status_plural), issue_statuses_path %> » <%=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 %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h2><%= link_to l(:label_issue_status_plural), issue_statuses_path %> » <%=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 %>
|
||||
|
|
|
@ -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? %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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' %>
|
||||
|
||||
|
|
|
@ -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' %>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h2><%= link_to l(:label_tracker_plural), trackers_path %> » <%=h @tracker %></h2>
|
||||
|
||||
<% form_for @tracker, :builder => TabularFormBuilder do |f| %>
|
||||
<% labelled_form_for @tracker do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h2><%= link_to l(:label_tracker_plural), trackers_path %> » <%=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 %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h2><%= link_to l(:label_user_plural), users_path %> » <%=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>
|
||||
|
|
Loading…
Reference in New Issue