<commit_before><% title "Edit Bounty ##{@wip.number}", @product.name %>
<% activate_nav! :bounties %>

<div class="page-header sheet-header">
  <h2 class="page-header-title">Edit task</h2>
</div>


<div class="sheet-body">
  <div class="row">
    <div class="col-md-8">
      <%= form_for [@product, @wip] do |f| %>
        <div class="form-group">
          <%= f.label :title, class: 'control-label' %>
          <%= f.text_field :title, 'class' => 'form-control', data: {'validate-length' => 2} %>
        </div>

        <div class="form-group" data-react-class="NewComment" data-react-props="<%= {
          commentId: 'task_description',
          hideAvatar: true,
          hideButtons: true,
          initialRows: 8,
          initialText: @wip.description,
          name: 'task[description]',
          thread: 'task_description',
          url: product_task_path(@product, @wip)
        }.to_json %>">
        </div>

        <div style="display:none;">
          <select type="hidden" id="tag-list-hack" name="task[tag_list][]" multiple="true"></select>
        </div>

        <h6 style="margin-bottom: 0;">Tags</h6>
        <div style="margin-bottom: 10px"
             data-react-class="TagList"
             data-react-props="<%= {
                tags: (@wip.tags.any? ? @wip.tags.map(&:name) : []).as_json,
                destination: true,
                allowRemoval: true,
                filterUrl: product_wips_path(@wip.product),
                url: product_wip_tag_path(@product, @wip)
              }.to_json %>">
        </div>

        <div data-react-class="Typeahead"
             data-react-props="<%= {
               width: "125px",
               size: "small",
               label: "Add tag",
               prepend: "#",
               prompt: "Add",
               url: product_wip_tag_path(@product, @wip)
             }.to_json %>">
        </div>

        <h6 style="margin-bottom: 0; margin-top: 20px;">Suggested tags</h6>
        <div data-react-class="TagList"
              data-react-props="<%= {
                tags: Wip::Tag.suggested_tags.as_json,
                destination: false,
                filterUrl: product_wips_path(@wip.product),
                url: product_wip_tag_path(@product, @wip)
              }.to_json %>">
        </div>

        <div class="form-actions">
          <%= f.button 'Update task', 'class' => 'btn btn-primary' %>
        </div>
      <% end %>
    </div>
  </div>
</div><commit_msg>Display new list of tags on edit page as well<commit_after><% title "Edit Bounty ##{@wip.number}", @product.name %>
<% activate_nav! :bounties %>

<div class="page-header sheet-header">
  <h2 class="page-header-title">Edit task</h2>
</div>


<div class="sheet-body">
  <div class="row">
    <div class="col-md-8">
      <%= form_for [@product, @wip] do |f| %>
        <div class="form-group">
          <%= f.label :title, class: 'control-label' %>
          <%= f.text_field :title, 'class' => 'form-control', data: {'validate-length' => 2} %>
        </div>

        <div class="form-group" data-react-class="NewComment" data-react-props="<%= {
          commentId: 'task_description',
          hideAvatar: true,
          hideButtons: true,
          initialRows: 8,
          initialText: @wip.description,
          name: 'task[description]',
          thread: 'task_description',
          url: product_task_path(@product, @wip)
        }.to_json %>">
        </div>

        <div style="display:none;">
          <select type="hidden" id="tag-list-hack" name="task[tag_list][]" multiple="true"></select>
        </div>

        <h6 style="margin-bottom: 0;">Tags</h6>
        <div style="margin-bottom: 10px"
             data-react-class="TagList"
             data-react-props="<%= {
                tags: (@wip.tags.any? ? @wip.tags.map(&:name) : []).as_json,
                destination: true,
                allowRemoval: true,
                filterUrl: product_wips_path(@wip.product),
                url: product_wip_tag_path(@product, @wip)
              }.to_json %>">
        </div>

        <div data-react-class="Typeahead"
             data-react-props="<%= {
               width: "125px",
               size: "small",
               label: "Add tag",
               prepend: "#",
               prompt: "Add",
               url: product_wip_tag_path(@product, @wip)
             }.to_json %>">
        </div>

        <h6 style="margin-bottom: 0; margin-top: 20px;">Suggested tags</h6>
        <div data-react-class="TagList"
              data-react-props="<%= {
                tags: Wip::Tag.suggested_tags(current_user).as_json,
                destination: false,
                filterUrl: product_wips_path(@wip.product),
                url: product_wip_tag_path(@product, @wip)
              }.to_json %>">
        </div>

        <div class="form-actions">
          <%= f.button 'Update task', 'class' => 'btn btn-primary' %>
        </div>
      <% end %>
    </div>
  </div>
</div>
{'fraction_non_alphanumeric': 0.1720688275310124, 'fraction_numerical': 0.007202881152460984, 'mean_word_length': 1.8895953757225434, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2946528', 'n_tokens_mistral': 1681, 'n_tokens_neox': 1564, 'n_words': 298}