diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0f7bd945573cc46681ff7774d2e582bd59044551..9e38d801cdafe18b950d40e981cb1ffb083004c2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -65,4 +65,8 @@ module ApplicationHelper Rails.application.config.default_images_formats.join(', ') end + def default_images_formats_accepted_hints + t('default_images_hint', formats: default_images_formats_accepted) + end + end diff --git a/app/views/admin/application/featured_image/_edit.html.erb b/app/views/admin/application/featured_image/_edit.html.erb index 2abb7b21d459ef2a338f953c9b97a7610e1ebc6d..36b5c002ca122d22779d35b1e56f3d2ee64bbbc0 100644 --- a/app/views/admin/application/featured_image/_edit.html.erb +++ b/app/views/admin/application/featured_image/_edit.html.erb @@ -3,7 +3,7 @@ as: :single_deletable_file, direct_upload: true, label: false, - hint: t('default_images_hint', formats: default_images_formats_accepted), + hint: default_images_formats_accepted_hints, input_html: { accept: default_images_formats_accepted }, preview: true, resize: true %> diff --git a/app/views/admin/communication/blocks/components/image/_edit.html.erb b/app/views/admin/communication/blocks/components/image/_edit.html.erb index 1aa10f55fc0861f0cb6532f09c8556822542e4e9..eb69e2082d58c47ae6da798ffb61d64a533d372e 100644 --- a/app/views/admin/communication/blocks/components/image/_edit.html.erb +++ b/app/views/admin/communication/blocks/components/image/_edit.html.erb @@ -1,7 +1,7 @@ <% label = t('admin.communication.blocks.components.image.input.label') remove = t('admin.communication.blocks.components.image.input.remove') -hint = t('default_images_hint', formats: default_images_formats_accepted) +hint = default_images_formats_accepted_hints %> <div class="mb-3"> <div v-if="!<%= model %>.<%= property %>.id"> diff --git a/app/views/admin/communication/extranets/_form.html.erb b/app/views/admin/communication/extranets/_form.html.erb index a21c722cf61e7fd5e9e32b14798eca60e28fb3cc..a01855258f25d7a9726299fa0d77b0288a55d6b6 100644 --- a/app/views/admin/communication/extranets/_form.html.erb +++ b/app/views/admin/communication/extranets/_form.html.erb @@ -15,7 +15,7 @@ <%= osuny_panel t('look_feel') do %> <%= f.input :logo, as: :single_deletable_file, - hint: t('default_images_hint', formats: default_images_formats_accepted), + hint: default_images_formats_accepted_hints, input_html: { accept: default_images_formats_accepted }, preview: 200, direct_upload: true %>