.row .col-md-12 = hc.input :title, label: false, placeholder: t('activerecord.attributes.home.title').titleize .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 .row .col-md-12{ 'data-crop-container' => true } - home_content = home.home_secondary_sections[index_section].home_contents[index_content] - 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") = hc.text_field :image, value: home_image_base64, class: 'base64CropedImage d-none' %input{ type:'file', 'data-file'=>true } = render partial: '/layouts/site/crop_modal' %input.crop-config{ type:'hidden', 'width'=>310, 'height'=>100 }