diff --git a/app/controllers/conference_administration_controller.rb b/app/controllers/conference_administration_controller.rb index e0a6666..fcbd3e4 100644 --- a/app/controllers/conference_administration_controller.rb +++ b/app/controllers/conference_administration_controller.rb @@ -44,6 +44,7 @@ class ConferenceAdministrationController < ApplicationController end def edit_event + @event = Event.find(params[:id]) administration_step(:event_edit) end @@ -1473,11 +1474,11 @@ class ConferenceAdministrationController < ApplicationController # save translations (params[:info] || {}).each do |locale, value| - event.set_column_for_locale(:title, locale, html_value(value), current_user.id) unless value = event._title(locale) + event.set_column_for_locale(:info, locale, value, current_user.id) if value != event._info(locale) && view_context.strip_tags(value).strip.present? end (params[:title] || {}).each do |locale, value| - event.set_column_for_locale(:info, locale, value, current_user.id) unless value = event._info(locale) + event.set_column_for_locale(:title, locale, html_value(value), current_user.id) if value != event._title(locale) && view_context.strip_tags(value).strip.present? end event.save diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index ddaf0d6..862ba91 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -27,9 +27,7 @@ module FormHelper value = object.is_a?(Hash) ? object[locale.to_sym] : object.get_column_for_locale!(name, locale, false) # use the default value if we need to - if _options[:default].present? && value.blank? - value = _(_options[:default], locale: locale) - end + value = _(_options[:default], locale: locale) if _options[:default].present? && value.blank? _options[:index] = locale _options[:lang] = locale