summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r--app/views/custom_fields/_index.html.erb1
-rw-r--r--app/views/custom_fields/new.html.erb1
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 %>