Browse Source

Fixed error on event creation page

development
Godwin 8 years ago
parent
commit
89af3c5aae
  1. 7
      app/helpers/application_helper.rb

7
app/helpers/application_helper.rb

@ -1560,6 +1560,7 @@ module ApplicationHelper
def textfield(name, value, options = {}) def textfield(name, value, options = {})
html = '' html = ''
id = unique_id(name) id = unique_id(name)
html_name = name.to_s + (options[:index] ? "[#{options[:index]}]" : '')
description_id = nil description_id = nil
if options[:heading].present? if options[:heading].present?
@ -1635,14 +1636,14 @@ module ApplicationHelper
if options[:required] && options[:options].first.present? && options[:options].first.last.present? if options[:required] && options[:options].first.present? && options[:options].first.last.present?
option_list = ('<option value="">&nbsp;</option>' + option_list).html_safe option_list = ('<option value="">&nbsp;</option>' + option_list).html_safe
end end
html += select_tag(name, option_list, input_options) html += select_tag(html_name, option_list, input_options)
when :file when :file
add_inline_script :filefield add_inline_script :filefield
input_options[:tabindex] = '-1' input_options[:tabindex] = '-1'
html += off_screen(file_field_tag name, input_options) html += off_screen(file_field_tag html_name, input_options)
else else
input_options[:autocomplete] = 'off' if options[:type] == :search input_options[:autocomplete] = 'off' if options[:type] == :search
html += send("#{(options[:type] || :text).to_s}_field_tag", name, value, input_options) html += send("#{(options[:type] || :text).to_s}_field_tag", html_name, value, input_options)
end end
if options[:after].present? if options[:after].present?

Loading…
Cancel
Save