mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
If Rails config.assets.compile is false and config.assets.digest is true, which is the case for staging and production, image_tag fails when the image file is not found. We do not need sprockets to ensure presence of the image file for these tags, because the correct SRC values are assigned through the JS. Inserting HTML should be sufficient.
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
.row.page-admin-enterprises-form__logo-field-group.image-field-group
|
|
.alpha.three.columns
|
|
= f.label :logo
|
|
%br
|
|
100 x 100 pixels
|
|
.omega.eight.columns
|
|
%img{ class: 'image-field-group__preview-image', ng: { src: '{{ Enterprise.logo.medium }}', if: 'Enterprise.logo' } }
|
|
= f.file_field :logo
|
|
%a.button.red{ href: '', ng: {click: 'removeLogo()', if: 'Enterprise.logo'} }
|
|
= t('admin.enterprises.remove_logo.remove')
|
|
|
|
.row.page-admin-enterprises-form__promo-image-field-group.image-field-group
|
|
.alpha.three.columns
|
|
= f.label :promo_image, 'ofn-with-tip' => t('.promo_image_placeholder')
|
|
%br/
|
|
%span{ style: 'font-weight:bold' }= t('.promo_image_note1')
|
|
%br
|
|
= t('.promo_image_note2')
|
|
%br
|
|
= t('.promo_image_note3')
|
|
|
|
.omega.eight.columns
|
|
%img{ class: 'image-field-group__preview-image', ng: { src: '{{ Enterprise.promo_image.large }}', if: 'Enterprise.promo_image' } }
|
|
= f.file_field :promo_image
|
|
%a.button.red{ href: '', ng: {click: 'removePromoImage()', if: 'Enterprise.promo_image'} }
|
|
= t('admin.enterprises.remove_promo_image.remove')
|