diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ddfc44a8c..1232a8126 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -871,28 +871,28 @@ module ApplicationHelper options = args.last options[:html] ||= {} options[:html][:class] = 'tabular' unless options[:html].has_key?(:class) - options.merge!({:builder => TabularFormBuilder}) + options.merge!({:builder => Redmine::Views::LabelledFormBuilder}) form_for(*args, &proc) end def labelled_form_for(*args, &proc) args << {} unless args.last.is_a?(Hash) options = args.last - options.merge!({:builder => TabularFormBuilder}) + options.merge!({:builder => Redmine::Views::LabelledFormBuilder}) 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}) + options.merge!({:builder => Redmine::Views::LabelledFormBuilder}) 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}) + options.merge!({:builder => Redmine::Views::LabelledFormBuilder}) remote_form_for(*args, &proc) end diff --git a/lib/tabular_form_builder.rb b/lib/redmine/views/labelled_form_builder.rb similarity index 96% rename from lib/tabular_form_builder.rb rename to lib/redmine/views/labelled_form_builder.rb index 7dbf6fc00..d83df37dc 100644 --- a/lib/tabular_form_builder.rb +++ b/lib/redmine/views/labelled_form_builder.rb @@ -17,7 +17,7 @@ require 'action_view/helpers/form_helper' -class TabularFormBuilder < ActionView::Helpers::FormBuilder +class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder include Redmine::I18n (field_helpers.map(&:to_s) - %w(radio_button hidden_field fields_for) +