<%= render :partial => 'action_menu' %> <%= title l(:label_workflow) %>

<%=l(:text_workflow_edit)%>:

<%= form_tag({}, :method => 'get') do %>

<%= submit_tag l(:button_edit), :name => nil %> <%= hidden_field_tag 'used_statuses_only', '0' %>

<% end %> <% if @tracker && @role && @statuses.any? %> <%= form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'role_id', @role.id %> <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>
<% for status in @statuses %> <% end %> <% @fields.each do |field, name| %> "> <% for status in @statuses -%> <% end -%> <% end %> <% if @custom_fields.any? %> <% @custom_fields.each do |field| %> "> <% for status in @statuses -%> <% end -%> <% end %> <% end %>
<%=l(:label_issue_status)%>
<%=h status.name %>
  <%= l(:field_core_fields) %>
<%=h name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> <%= field_permission_tag(@permissions, status, field, @role) %> <% unless status == @statuses.last %>»<% end %>
  <%= l(:label_custom_field_plural) %>
<%=h field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> <%= field_permission_tag(@permissions, status, field, @role) %> <% unless status == @statuses.last %>»<% end %>
<%= submit_tag l(:button_save) %> <% end %> <% end %> <%= javascript_tag do %> $("a.repeat-value").click(function(e){ e.preventDefault(); var td = $(this).closest('td'); var selected = td.find("select").find(":selected").val(); td.nextAll('td').find("select").val(selected); }); <% end %>