fix sorting of custom fields back url

pull/5442/head
Jens Ulferts 8 years ago
parent ec41e10013
commit 32a3b0865b
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 2
      app/controllers/custom_fields_controller.rb
  2. 2
      app/views/custom_fields/_tab.html.erb

@ -71,7 +71,7 @@ class CustomFieldsController < ApplicationController
if ok
flash[:notice] = t(:notice_successful_update)
call_hook(:controller_custom_fields_edit_after_save, custom_field: @custom_field)
redirect_to edit_custom_field_path(id: @custom_field.id)
redirect_back_or_default edit_custom_field_path(id: @custom_field.id)
else
render action: 'edit'
end

@ -113,7 +113,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td><%= checked_image custom_field.is_for_all? %></td>
<td><%= l(:label_x_projects, count: custom_field.projects.count) if custom_field.is_a? WorkPackageCustomField and !custom_field.is_for_all? %></td>
<% end %>
<td><%= reorder_links('custom_field', {action: 'update', id: custom_field}, method: :put) %></td>
<td><%= reorder_links('custom_field', { action: 'update', id: custom_field, back_url: custom_fields_path }, method: :put) %></td>
<td class="buttons">
<%= delete_link custom_field_path(custom_field) %>
</td>

Loading…
Cancel
Save