Commit b34216665800a61315867fb6aaf1b8421008d4c9

Authored by JoenioCosta
1 parent 78b30736

ActionItem373: resolving bug when change language in new article form


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1945 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/helpers/language_helper.rb
@@ -14,7 +14,7 @@ module LanguageHelper @@ -14,7 +14,7 @@ module LanguageHelper
14 if options[:element] == 'dropdown' 14 if options[:element] == 'dropdown'
15 select_tag('lang', 15 select_tag('lang',
16 options_for_select(Noosfero.locales.map{|code,name| [name, code]}, current), 16 options_for_select(Noosfero.locales.map{|code,name| [name, code]}, current),
17 - :onchange => "document.location.href='?' + name + '=' + value;", 17 + :onchange => "document.location.href= #{url_for(params.merge(:lang => 'LANGUAGE')).inspect}.replace(/LANGUAGE/, this.value) ;",
18 :help => _('The language you choose here is the language used for options, buttons, etc. It does not affect the language of the content created by other users.') 18 :help => _('The language you choose here is the language used for options, buttons, etc. It does not affect the language of the content created by other users.')
19 ) 19 )
20 else 20 else