<commit_before><%= form_for(@workflow, :html => {:multipart => true}) do |f| -%>
  <!-- Delete button -->
  <div class="asset_form">
    <%= error_messages_for :workflow -%>
    <%= hidden_field_tag 'workflow[title]', 'A workflow' -%>
    <% if @workflow.new_record? %>
      <p style="margin: 1.5em 0;">
        <b>File</b> <span class="required">*</span>
        <br/>
        <%= file_field_tag 'workflow[data]' %>
      </p>
    <% end %>

    <div class="fold">
      <div class="foldTitle">
        <%= help_icon("Here you can specify the category this workflow belongs to.") -%>
        Category
      </div>
      <div class="foldContent">
        <%= f.select(:category_id, WorkflowCategory.all.collect { |c| [c.name, c.id] }) %>
      </div>
    </div>

    <% unless @workflow.new_record? %>
      <div class="fold">
        <div class="foldTitle">
          <%= help_icon("Here you can select the input and output types of the workflow.") -%>
          Input and Output Types
        </div>
        <div class="foldContent" >
          <%= render :partial => 'port_type_table', :locals => {:f => f} %>
        </div>
      </div>
    <% end %>

    <div style="display: none">
      <%= render :partial => "projects/project_selector", :locals => {:resource => @workflow} -%>
    </div>

    <%= fields_for(@workflow) { |form| render :partial => "assets/asset_form_bottom", :locals => {:f => form,
                                                                                                  :attribution_enable => false, :creators_enable => false, :show_publications => false, :sharing_enable => !@workflow.new_record?, :sharing_link => false} } -%>

    <p>
      <%= preview_permission_popup_link(@workflow) -%>
      <%= submit_tag @workflow.new_record? ? "Next" : "Save Changes", :id => "workflow_submit_btn", :onclick => "javascript: validateResourceFields(true,'workflow',true); return(false);" -%>
      or
      <%= link_to 'Cancel', workflows_path -%>
    </p>
  </div>

<% end %>
<commit_msg>Cancel button on workflow/edit page now correctly redirects to workflow/show instead of workflow/index as per SERVINF-285.<commit_after><%= form_for(@workflow, :html => {:multipart => true}) do |f| -%>
  <!-- Delete button -->
  <div class="asset_form">
    <%= error_messages_for :workflow -%>
    <%= hidden_field_tag 'workflow[title]', 'A workflow' -%>
    <% if @workflow.new_record? %>
      <p style="margin: 1.5em 0;">
        <b>File</b> <span class="required">*</span>
        <br/>
        <%= file_field_tag 'workflow[data]' %>
      </p>
    <% end %>

    <div class="fold">
      <div class="foldTitle">
        <%= help_icon("Here you can specify the category this workflow belongs to.") -%>
        Category
      </div>
      <div class="foldContent">
        <%= f.select(:category_id, WorkflowCategory.all.collect { |c| [c.name, c.id] }) %>
      </div>
    </div>

    <% unless @workflow.new_record? %>
      <div class="fold">
        <div class="foldTitle">
          <%= help_icon("Here you can select the input and output types of the workflow.") -%>
          Input and Output Types
        </div>
        <div class="foldContent" >
          <%= render :partial => 'port_type_table', :locals => {:f => f} %>
        </div>
      </div>
    <% end %>

    <div style="display: none">
      <%= render :partial => "projects/project_selector", :locals => {:resource => @workflow} -%>
    </div>

    <%= fields_for(@workflow) { |form| render :partial => "assets/asset_form_bottom", :locals => {:f => form,
                                                                                                  :attribution_enable => false, :creators_enable => false, :show_publications => false, :sharing_enable => !@workflow.new_record?, :sharing_link => false} } -%>

    <p>
      <%= preview_permission_popup_link(@workflow) -%>
      <%= submit_tag @workflow.new_record? ? "Next" : "Save Changes", :id => "workflow_submit_btn", :onclick => "javascript: validateResourceFields(true,'workflow',true); return(false);" -%>
      or
      <%= link_to 'Cancel', workflow_path -%>
    </p>
  </div>

<% end %>

{'fraction_non_alphanumeric': 0.1821911196911197, 'fraction_numerical': 0.002171814671814672, 'mean_word_length': 2.4455527847049043, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5033747', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1282, 'n_words': 291}