From d6f3d015ee9ea63237f922b01861380252740ed5 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Tue, 7 Jul 2015 10:16:43 -0300 Subject: [PATCH] Fix email template selection --- views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb | 1 + views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb b/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb index dff234e..6e4e703 100644 --- a/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb +++ b/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb @@ -1,3 +1,4 @@ +<%= task_email_template(_('Select an acceptance email template:'), @acceptance_email_templates, task) %> <% unless @view_only %> <%= f.fields_for 'article', OpenStruct.new(task.article) do |a| %> <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target, task.article_parent_id) %> diff --git a/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb b/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb index 5197210..f5e4763 100644 --- a/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb +++ b/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb @@ -1,8 +1,4 @@ -<% if @email_templates.present? %> -
- <%= labelled_form_field(_('Select a rejection email template:'), select_tag("tasks[#{task.id}][task][email_template_id]", options_from_collection_for_select(@email_templates, :id, :name), :include_blank => true, 'data-url' => url_for(:controller => 'email_templates', :action => 'show_parsed'))) %> -
- <% if task.flagged_for_reproval? %> - - <% end %> +<%= task_email_template(_('Select a rejection email template:'), @rejection_email_templates, task) %> +<% if task.flagged_for_reproval? %> + <% end %> -- libgit2 0.21.2