app/views/spree/zoned/_countryselect.html.erb in spree_zoned-0.5.24 vs app/views/spree/zoned/_countryselect.html.erb in spree_zoned-0.5.25
- old
+ new
@@ -1,18 +1,33 @@
<div id="zoned-countryselect" class="columns omega ten">
+ <% c = ((session[:zoned] && session[:zoned][:current_country]) || -214) %>
<%= label_tag t('country') + ": " %>
<%= select_tag 'id',
options_for_select( # common countries have negative id
Rails.application.config.commonCountriesForSelect +
[["-----------------", 0]] +
countrylist.map { |country| [country.name, country.id] },
- (session[:zoned] && session[:zoned][:current_country]) || -214, # Unites States
+ c,
),
:data => {
:remote => true,
:url => url_for(
:controller => "zoned",
:action => "setcountry",
),
}
+ %>
+ <%= label_tag t('language') + ": " %>
+ <%= select_tag 'lgid',
+ options_for_select( # common countries have negative id
+ hlpAvailLangs(c.to_i),
+ (session[:zoned] && session[:zoned][:current_language]) || "en", # English
+ ),
+ :data => {
+ :remote => true,
+ :url => url_for(
+ :controller => "zoned",
+ :action => "setlanguage",
+ ),
+ }
%>
</div>