From 44f07d08a1695f92e696b1db3def10fdfb937ef9 Mon Sep 17 00:00:00 2001 From: Brice Sanchez Date: Tue, 6 Mar 2018 22:17:24 -0500 Subject: [PATCH] Bugfix #2915: assign cancel_url path in engine generator _form partial This will fix Cancel button who did not work on non-posts after switching languages --- .../refinery/namespace/admin/plural_name/_form.html.erb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb b/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb index 9ab82194a0..604a5f19d9 100644 --- a/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +++ b/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb @@ -48,10 +48,11 @@ <% end -%> <% end -%> - <%%= render '/refinery/admin/form_actions', :f => f, - :continue_editing => false, - :delete_title => t('delete', :scope => 'refinery.<%= plural_name %>.admin.<%= plural_name %>.<%= singular_name %>'), - :delete_confirmation => t('message', :scope => 'refinery.admin.delete'<% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? %>, :title => @<%= singular_name %>.<%= title.name %><% end %>) -%> + <%%= render '/refinery/admin/form_actions', f: f, + continue_editing: false, + delete_title: t('delete', scope: 'refinery.<%= plural_name %>.admin.<%= plural_name %>.<%= singular_name %>'), + delete_confirmation: t('message', scope: 'refinery.admin.delete'<% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? %>, title: @<%= singular_name %>.<%= title.name %><% end %>), + cancel_url: refinery.<%= plural_name %>_admin_<%= plural_name %>_path -%> <%% end -%> <% if text_areas.any? -%>