<commit_before>#attachment-fields
  %h3 Attached Files
  %p
    %strong Tips for this page:
  .collapsible
    .box
      %ul
        %li
          %p
            If you need to attach a large number of files, consider
            creating and uploading a ZIP archive. ADAPT will extract
            the individual files for you automatically.
    .clear
  %hr
  %p= @form.errors_on(:attachments)
  - unless @study.attachments.empty?
    %p
      %em
        (For each file, please check either the "Data File" or
        "Documentation" box and provide a short description of the
        contents.)

    - @form.fields_for :attachments do |f|
      %hr
      %strong= h f.object.name
      &nbsp;
      %em== (#{number_to_human_size f.object.data.size})
      &nbsp;
      = f.check_box :_destroy, :label => "Delete this file"
      - if f.object.name.ends_with?('.zip')
        = f.check_box :extract, :label => "Extract this ZIP file"
      %p
        = f.errors_on(:category)
        = f.radio_button :category, "Data File"
        = f.radio_button :category, "Documentation"
      = f.text_area :description, :rows => 2
    %hr

  %h3 Select files to upload:
  - @form.fields_for :uploads, Attachment.new do |f|
    = f.file_field :content, :label => '', :multi => true<commit_msg>Changed help texts on attachments tab.<commit_after>#attachment-fields
  %h3 Attached Files

  %p= @form.errors_on(:attachments)
  - unless @study.attachments.empty?
    %p
      %em
        (For each file, please check either the "Data File" or
        "Documentation" box and provide a short description of the
        contents.)

    - @form.fields_for :attachments do |f|
      %hr
      %strong= h f.object.name
      &nbsp;
      %em== (#{number_to_human_size f.object.data.size})
      &nbsp;
      = f.check_box :_destroy, :label => "Delete this file"
      - if f.object.name.ends_with?('.zip')
        = f.check_box :extract, :label => "Extract this ZIP file"
      %p
        = f.errors_on(:category)
        = f.radio_button :category, "Data File"
        = f.radio_button :category, "Documentation"
      = f.text_area :description, :rows => 2
    %hr

  %h3 Select files to upload:
  %p
    %em
      (You can upload files individually or in batches packaged as ZIP
      files. The latter can be submitted as is or the contained files
      extracted after uploading.)
  - @form.fields_for :uploads, Attachment.new do |f|
    = f.file_field :content, :label => '', :multi => true
{'fraction_non_alphanumeric': 0.11370967741935484, 'fraction_numerical': 0.0024193548387096775, 'mean_word_length': 2.380108991825613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2990', 'n_tokens_mistral': 793, 'n_tokens_neox': 780, 'n_words': 245}