<commit_before><!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />
  <head>
    <title>Attachment</title>
  </head>

  <body py:with="parent = attachments and attachments.parent or
                          attachment.resource.parent">
    <div py:choose="mode" id="content" class="attachment">
      <py:when test="'new'">
        <h1>Add Attachment to <a href="${url_of(parent)}">${name_of(parent)}</a></h1>
        <form id="attachment" method="post" enctype="multipart/form-data" action="">
          <div class="field">
            <label>File<py:if test="max_size"> (size limit
                  ${pretty_size(max_size, format='%d')})</py:if>:<br />
              <input type="file" name="attachment" /></label>
          </div>
          <fieldset>
            <legend>Attachment Info</legend>
            <py:if test="authname == 'anonymous'">
              <div class="field">
                <label>Your email or username:<br />
                  <input type="text" name="author" size="30" value="$author" />
                </label>
              </div>
              </py:if>
            <div class="field">
              <label>Description of the file (optional):<br />
                <input type="text" name="description" size="60" /></label>
            </div>
            <br />
            <div class="options">
              <label><input type="checkbox" name="replace" /><commit_msg>Small follow-up to [6286] - using the same check in attachment template for `max-size` that we use in code (where 0 seems to be a valid size limit, and -1 is unlimited).<commit_after><!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />
  <head>
    <title>Attachment</title>
  </head>

  <body py:with="parent = attachments and attachments.parent or
                          attachment.resource.parent">
    <div py:choose="mode" id="content" class="attachment">
      <py:when test="'new'">
        <h1>Add Attachment to <a href="${url_of(parent)}">${name_of(parent)}</a></h1>
        <form id="attachment" method="post" enctype="multipart/form-data" action="">
          <div class="field">
            <label>File<py:if test="max_size >= 0"> (size limit
                  ${pretty_size(max_size, format='%d')})</py:if>:<br />
              <input type="file" name="attachment" /></label>
          </div>
          <fieldset>
            <legend>Attachment Info</legend>
            <py:if test="authname == 'anonymous'">
              <div class="field">
                <label>Your email or username:<br />
                  <input type="text" name="author" size="30" value="$author" />
                </label>
              </div>
              </py:if>
            <div class="field">
              <label>Description of the file (optional):<br />
                <input type="text" name="description" size="60" /></label>
            </div>
            <br />
            <div class="options">
              <label><input type="checkbox" name="replace" />
{'fraction_non_alphanumeric': 0.17959647627166808, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 2.1626235399820306, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 94, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 6}, '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': '2465987', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1065, 'n_words': 219}