diff options
author | Go MAEDA <maeda@farend.jp> | 2020-12-26 01:36:19 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-12-26 01:36:19 +0000 |
commit | 972f00eb473ffd07292bb0960428c0181046b613 (patch) | |
tree | c401a9b942d67ca555bf8391da3fa9f563c030be /app/views/custom_fields | |
parent | 46156e08a9a61a07c89045ad6e6d9ccbaebd875a (diff) | |
download | redmine-972f00eb473ffd07292bb0960428c0181046b613.tar.gz redmine-972f00eb473ffd07292bb0960428c0181046b613.zip |
Create custom field by copy (#34307).
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@20692 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r-- | app/views/custom_fields/_index.html.erb | 1 | ||||
-rw-r--r-- | app/views/custom_fields/new.html.erb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb index 04d4aa21d..81fe21404 100644 --- a/app/views/custom_fields/_index.html.erb +++ b/app/views/custom_fields/_index.html.erb @@ -22,6 +22,7 @@ <% end %> <td class="buttons"> <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %> + <%= link_to_function l(:button_copy), "location.href = '#{new_custom_field_path(:copy => custom_field)}&type=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-copy' %> <%= delete_link custom_field_path(custom_field) %> </td> </tr> diff --git a/app/views/custom_fields/new.html.erb b/app/views/custom_fields/new.html.erb index db422296b..45b5cc0cf 100644 --- a/app/views/custom_fields/new.html.erb +++ b/app/views/custom_fields/new.html.erb @@ -3,6 +3,7 @@ <%= labelled_form_for :custom_field, @custom_field, :url => custom_fields_path, :html => {:id => 'custom_field_form'} do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= hidden_field_tag 'type', @custom_field.type %> +<%= hidden_field_tag 'copy', @copy_from.id if @copy_from %> <% end %> <%= javascript_tag do %> |