Updated Site Preferences with language fix
This commit is contained in:
1 parent
ace582be0c
commit
e42cf8720e
3 files changed
+21
-6
No files matched your search
@@ -154,8 +154,11 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Enable Language</label>
|
||||
<div class="controls">
|
||||
<% @site.in_use_locales.each do |locale|%>
|
||||
<%= locale %>
|
||||
<% end %>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<%= check_box_tag "site[enable_locales][]", locale, @site.valid_locales.include?(locale), :class=>"toggle-check", :data => { :title => "#{I18nVariable.from_locale(locale)}" } %>
|
||||
<%= check_box_tag "site[in_use_locales][]", valid_locale, @site.in_use_locales.include?(valid_locale), :class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(valid_locale)}" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +167,7 @@
|
||||
<label class="control-label muted">Default Language</label>
|
||||
<div class="controls">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= check_box_tag :default_locale, locale, (@site.default_locale.nil?), :class=>"toggle-check", :data => { :title => "#{I18nVariable.from_locale(locale)}" } %>
|
||||
<%= radio_button_tag "site[default_locale]", locale, @locale == locale ,:class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(locale)}" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,4 +240,15 @@
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<%end%>
|
||||
<%end%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$( ".in_use_locales" ).each( function(){
|
||||
if( $( this ).val() != "" ){
|
||||
$( this ).parent( "div.togglebox" ).removeClass( "disabled" );
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
Reference in new issue
Block a user