Fix html bug.

This commit is contained in:
BoHung Chiu 2023-02-23 16:52:50 +08:00
parent e2ab04b95c
commit 795331d942
1 changed files with 41 additions and 31 deletions

View File

@ -27,6 +27,7 @@
<div class="tab-content language-area">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<div class="control-group">
<%= f.label :sunday_first, t("calendar.sunday_first"), :class => "control-label muted" %>
<div class="controls">
<%= f.fields_for :sunday_first_translations ,f.object do |f| %>
@ -34,6 +35,8 @@
<%= check_box_tag "#{f.object_name}[#{locale}]" , "1", f.object.get_sunday_first(locale) , :class=>"toggle-check", :data=> { disabled: true } %>
<% end %>
</div>
</div>
<div class="control-group">
<%= f.label :date_type, t("calendar.date_type"), :class => "control-label muted" %>
<div class="controls">
<%= f.fields_for :date_type_translations ,f.object do |f| %>
@ -44,25 +47,31 @@
<%= 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 %>
</div>
</div>
<div class="control-group">
<%= f.label :time_type, t("calendar.time_type"), :class => "control-label muted" %>
<div class="controls">
<%= 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 %>
</div>
</div>
<hr style="margin: 5px 0;border-top: 2px solid black;clear: left;">
<h4><%= t('calendar.calendar_mode') %></h4>
<% CalendarSetting::All_modes.each do |mode| %>
<div class="control-group">
<%= f.label mode, t("calendar.mode.#{mode}"), :class => "control-label muted" %>
<div class="controls">
<%= f.fields_for :modes_translations ,f.object do |f| %>
<%= text_field_tag "#{f.object_name}[#{locale}][#{mode}]" , f.object.get_mode(mode, locale) %>
<% end %>
</div>
</div>
<% end %>
<hr style="margin: 5px 0;border-top: 2px solid black;clear: left;">
<h4><%= t('calendar.day_of_the_week') %></h4>
<% CalendarSetting::All_days.each do |idx| %>
<div class="control-group">
<%= f.label "days_#{locale}_#{idx}", t("calendar.day.#{idx}"), :class => "control-label muted" %>
<% week_title = f.object.get_week_title(locale) %>
<div class="controls">
@ -70,6 +79,7 @@
<%= text_field_tag "#{f.object_name}[#{locale}][]" , week_title[idx] %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>