.row .col-md-12 = hc.association :section, label: false, placeholder: t('activerecord.attributes.home.section').titleize .row .col-md-12 = hc.input :title, label: false, placeholder: t('activerecord.attributes.home.title').titleize .col-md-10 .row .col-md-12 = hc.text_area :description, label: false, placeholder: t('activerecord.attributes.home.description').titleize, class: 'form-control mb-3'; .row .col-md-12 = hc.input :url, label: false, placeholder: t('activerecord.attributes.home.home_content_url').titleize - if index<2 .row %div.col-md-12{'data-crop-container' => true} - home_content = home.home_primary_section.home_contents[index] - home_image_base64 = '' - if home_content.image.present? - home_image_base64 = "data:image/png;base64,#{Base64.encode64(home_content.image.read)}" = image_tag(home_content.image_url.to_s, class: "menu_icon image-preview", 'width'=>234) = hc.text_field :image, value: home_image_base64, class: 'base64CropedImage d-none' %input{type:'file', 'data-file'=>true} = render partial: '/layouts/site/crop_modal' - if index==0 %input.crop-config{type:'hidden', 'width'=>468, 'height'=>292} - if index==1 %input.crop-config{type:'hidden', 'width'=>208, 'height'=>218}