Skip to content
Snippets Groups Projects
Commit 481c0385 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #764

parent abc0df0e
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,8 @@ class Admin::Communication::Websites::Posts::CurationsController < Admin::Commun
notice: t('admin.successfully_created_html', model: @curator.post.to_s)
else
breadcrumb
flash[:alert] = "Erreur lors de la curation"
@url = curation_params[:url]
flash[:alert] = t('curation.error')
render :new, status: :unprocessable_entity
end
end
......
......@@ -7,6 +7,7 @@ class Curator
@url = url
create_post!
attach_image! unless page.image.blank?
rescue
end
def valid?
......
......@@ -3,8 +3,9 @@
<%= simple_form_for :curation, url: admin_communication_website_post_curations_path, html: { id: 'new_communication_website_post_curation' } do |f| %>
<%= f.error_notification %>
<%= f.input :url,
label: 'URL',
value: params.dig(:curation, :url) %>
label: t('curation.label'),
placeholder: t('curation.placeholder'),
input_html: { value: @url } %>
<% content_for :action_bar_right do %>
<%= submit f %>
......
......@@ -667,6 +667,10 @@ en:
persons: Staff
teachers: Educational staff
url: URL
curation:
error: Import error, be sure to use a valid URL
label: URL of the post to import
placeholder: https://...
simple_form:
hints:
communication_extranet:
......
......@@ -669,6 +669,10 @@ fr:
persons: Équipe
teachers: Équipe pédagogique
url: URL
curation:
error: Erreur lors de la curation, veillez à utiliser une URL valide
label: URL de l'article à importer
placeholder: https://...
simple_form:
hints:
communication_extranet:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment