You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

copy.html.erb 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <%= title [l(:label_workflow), edit_workflows_path], l(:button_copy) %>
  2. <%= form_tag duplicate_workflows_path, method: :post, id: 'workflow_copy_form' do %>
  3. <fieldset class="tabular box">
  4. <legend><%= l(:label_copy_source) %></legend>
  5. <p>
  6. <label><%= l(:label_tracker) %></label>
  7. <%= select_tag('source_tracker_id',
  8. content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') +
  9. content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') +
  10. options_from_collection_for_select(@trackers, 'id', 'name', @source_tracker && @source_tracker.id)) %>
  11. </p>
  12. <p>
  13. <label><%= l(:label_role) %></label>
  14. <%= select_tag('source_role_id',
  15. content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') +
  16. content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') +
  17. options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %>
  18. </p>
  19. </fieldset>
  20. <fieldset class="tabular box">
  21. <legend><%= l(:label_copy_target) %></legend>
  22. <p>
  23. <label><%= l(:label_tracker) %></label>
  24. <%= select_tag 'target_tracker_ids',
  25. content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) +
  26. options_from_collection_for_select(@trackers, 'id', 'name', @target_trackers && @target_trackers.map(&:id)), :multiple => true %>
  27. </p>
  28. <p>
  29. <label><%= l(:label_role) %></label>
  30. <%= select_tag 'target_role_ids',
  31. content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) +
  32. options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), :multiple => true %>
  33. </p>
  34. </fieldset>
  35. <%= submit_tag l(:button_copy) %>
  36. <% end %>