">
<%= f.label :sunday_first, t("calendar.sunday_first"), :class => "control-label muted" %>
<%= f.fields_for :sunday_first_translations ,f.object do |f| %>
<%= hidden_field_tag "#{f.object_name}[#{locale}]" , "0" %>
<%= check_box_tag "#{f.object_name}[#{locale}]" , "1", f.object.get_sunday_first(locale) , :class=>"toggle-check", :data=> { disabled: true } %>
<% end %>
<%= f.label :date_type, t("calendar.date_type"), :class => "control-label muted" %>
<%= f.fields_for :date_type_translations ,f.object do |f| %>
<%
tmp = CalendarSetting::DateTypes[locale.to_s]
tmp = CalendarSetting::DateTypes["en"] if tmp.nil?
%>
<%= select_tag "#{f.object_name}[#{locale}]" , options_for_select(tmp.map.with_index{|t, idx| [t, idx]}, f.object.date_type_translations[locale]), {style: "width: auto;"} %>
<% end %>
<%= f.label :time_type, t("calendar.time_type"), :class => "control-label muted" %>
<%= f.fields_for :time_type_translations ,f.object do |f| %>
<%= select_tag "#{f.object_name}[#{locale}]" , options_for_select(CalendarSetting::TimeTypes.map.with_index{|type, idx| [t("calendar.#{type}"), idx]}, f.object.time_type_translations[locale]), {style: "width: auto;"} %>
<% end %>
<%= t('calendar.calendar_mode') %>
<% CalendarSetting::All_modes.each do |mode| %>
<%= f.label mode, t("calendar.mode.#{mode}"), :class => "control-label muted" %>
<%= f.fields_for :modes_translations ,f.object do |f| %>
<%= text_field_tag "#{f.object_name}[#{locale}][#{mode}]" , f.object.get_mode(mode, locale) %>
<% end %>
<% end %>
<%= t('calendar.day_of_the_week') %>
<% CalendarSetting::All_days.each do |idx| %>
<%= f.label "days_#{locale}_#{idx}", t("calendar.day.#{idx}"), :class => "control-label muted" %>
<% week_title = f.object.get_week_title(locale) %>
<%= f.fields_for :days_translations ,f.object do |f| %>
<%= text_field_tag "#{f.object_name}[#{locale}][]" , week_title[idx] %>
<% end %>
<% end %>