From c05744b846bd56c076b4f918321babc85d361806 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Fri, 2 Jun 2017 19:19:10 +0200 Subject: [PATCH] Add summary field to the admin form for Legislative Processes, plus placeholder translations --- .../admin/legislation/processes_controller.rb | 3 +-- .../admin/legislation/processes/_form.html.erb | 13 +++++++++++++ config/locales/admin.en.yml | 1 + config/locales/admin.es.yml | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/legislation/processes_controller.rb b/app/controllers/admin/legislation/processes_controller.rb index 8cc678151..268ef35c1 100644 --- a/app/controllers/admin/legislation/processes_controller.rb +++ b/app/controllers/admin/legislation/processes_controller.rb @@ -35,8 +35,7 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll def process_params params.require(:legislation_process).permit( :title, - :description_summary, - :target_summary, + :summary, :description, :target, :how_to_participate, diff --git a/app/views/admin/legislation/processes/_form.html.erb b/app/views/admin/legislation/processes/_form.html.erb index 89fd114a1..75c47aa39 100644 --- a/app/views/admin/legislation/processes/_form.html.erb +++ b/app/views/admin/legislation/processes/_form.html.erb @@ -164,6 +164,19 @@ +
+
+ <%= f.label :summary %> + <%= t('admin.legislation.processes.form.use_markdown') %> +
+
+ <%= f.text_area :summary, + label: false, + rows: 2, + placeholder: t('admin.legislation.processes.form.summary_placeholder') %> +
+
+
<%= f.label :description %> diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 49cb23ff0..1f7eef0a5 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -206,6 +206,7 @@ en: end: End use_markdown: Use Markdown to format the text title_placeholder: The title of the process + summary_placeholder: Short summary of the description description_placeholder: Add a description of the process target_placeholder: Describe who is the target of the process how_to_participate_placeholder: Describe how to participate diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 64e899312..bdcfa2e6e 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -206,6 +206,7 @@ es: end: Fin use_markdown: Usa Markdown para formatear el texto title_placeholder: Escribe el título del proceso + summary_placeholder: Resumen corto de la descripción description_placeholder: Añade una descripción del proceso target_placeholder: Describe a quién va dirigido how_to_participate_placeholder: Describe cómo participar