<%= Spree.t('admin.cms.side_by_side.left_image') %>

<%= f.field_container :image_one, class: ['form-group'] do %> <% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>
<%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>
<% elsif @cms_section.image_one.attached? && @cms_section.image_one.image? %>
<%= image_tag main_app.url_for(@cms_section.image_one) %>
<% end %> <%= f.field_container :image_one, class: ['form-group mb-0'] do %> <%= f.file_field :image_one %> <%= f.error_message_on :image_one %> <% end %> <%= Spree.t('admin.cms.side_by_side.image_info') %> <% end %>
<%= f.field_container :title_one, class: ['form-group'] do %> <%= f.label :title_one, Spree.t('admin.cms.title') %> <%= f.text_field :title_one, class: 'form-control' %> <%= f.error_message_on :title_one %> <% end %> <%= f.field_container :subtitle_one, class: ['form-group'] do %> <%= f.label :subtitle_one, Spree.t('admin.cms.subtitle') %> <%= f.text_field :subtitle_one, class: 'form-control' %> <%= f.error_message_on :subtitle_one %> <% end %>

<% unless rails_5? %> <%= f.field_container :link_type_one, class: ['form-group'] do %> <%= f.label :link_type_one, Spree.t('admin.navigation.link_to') %> <%= f.select(:link_type_one, spree_humanize_dropdown_values('Spree::Cms::Sections::SideBySideImages', { const: 'LINKED_RESOURCE_TYPE' }), { include_blank: false }, class: 'link_switcher', data: { target_field: :link_one}) %> <%= f.error_message_on :link_type_one %> <% end %> <% end %> <%= render "spree/admin/shared/link_fields", resource: @cms_section, linked_type: @cms_section.link_type_one, save_to: :link_one, f: f %>

<%= Spree.t('admin.cms.side_by_side.right_image') %>

<%= f.field_container :image_two, class: ['form-group'] do %> <% if @cms_section.image_two.attached? && @cms_section.image_two.variable? %>
<%= image_tag main_app.url_for(@cms_section.image_two.variant(resize: '244x104>')) %>
<% elsif @cms_section.image_two.attached? && @cms_section.image_two.image? %>
<%= image_tag main_app.url_for(@cms_section.image_two) %>
<% end %> <%= f.field_container :image_two, class: ['form-group mb-0'] do %> <%= f.file_field :image_two %> <%= f.error_message_on :image_two %> <% end %> <%= Spree.t('admin.cms.side_by_side.image_info') %> <% end %>
<%= f.field_container :title_two, class: ['form-group'] do %> <%= f.label :title_two, Spree.t('admin.cms.title') %> <%= f.text_field :title_two, class: 'form-control' %> <%= f.error_message_on :title_two %> <% end %> <%= f.field_container :subtitle_two, class: ['form-group'] do %> <%= f.label :subtitle_two, Spree.t('admin.cms.subtitle') %> <%= f.text_field :subtitle_two, class: 'form-control' %> <%= f.error_message_on :subtitle_two %> <% end %>

<% unless rails_5? %> <%= f.field_container :link_type_two, class: ['form-group'] do %> <%= f.label :link_type_two, Spree.t('admin.navigation.link_to') %> <%= f.select(:link_type_two, spree_humanize_dropdown_values('Spree::Cms::Sections::SideBySideImages', { const: 'LINKED_RESOURCE_TYPE' }), { include_blank: false }, class: 'link_switcher', data: { target_field: :link_two}) %> <%= f.error_message_on :link_type_two %> <% end %> <% end %> <%= render "spree/admin/shared/link_fields", resource: @cms_section, linked_type: @cms_section.link_type_two, save_to: :link_two, f: f %>

<%= f.field_container :fit, class: ['form-group'] do %> <%= f.label :fit, Spree.t('admin.cms.fit') %> <%= f.select(:fit, @cms_section.boundaries, {include_blank: false}, class: 'select2') %> <%= f.error_message_on :fit %> <% end %>
<%= f.field_container :gutters, class: ['form-group'] do %> <%= f.label :gutters, Spree.t('admin.cms.set_gutters') %> <%= f.select(:gutters, @cms_section.gutters_sizes, {include_blank: false}, class: 'select2') %> <%= f.error_message_on :gutters %> <% end %>