OpenFest: Tweak event language selection

This commit is contained in:
Petko Bordjukov 2015-08-15 01:24:59 +03:00
parent 1da6c0bd20
commit 0670768068
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,9 @@
module OpenFest module OpenFest
module ApplicationHelper module ApplicationHelper
def locale_collection
I18n.available_locales.map do |locale|
[t("locales.#{locale}"), locale]
end
end
end end
end end

View File

@ -14,7 +14,7 @@
-# TODO length is different for different types of events (translation problem) -# TODO length is different for different types of events (translation problem)
= form.input :length = form.input :length
= form.input :language, as: :radio_buttons, collection: I18n.available_locales, include_blank: false, default: I18n.locale, wrapper: :default = form.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, checked: current_user.language
= form.input :abstract = form.input :abstract
= form.input :description = form.input :description
= form.input :notes = form.input :notes