<commit_before>{% extends 'requestoid/base.html' %}
{% block content %}
<h1>{{ content.headline }}</h1>
<form action="/requests/{{ language }}/bulk" method="post">
{% csrf_token %}
<div class="ui form">
<div id="titlesandnotes" class="titlesandnotes">
<div id="titleandnote1" class="titleandnote">
    <div>
        <label for="pagetitle" class="">{{ content.page_title_label }}</label>
        <input type="text" class="" name="pagetitle[]" id="pagetitle1"></input>
    </div>
    <div>
        <label for="note" class="">{{ content.add_a_note }}</label>
        <textarea class="" name="note[]" id="note1"></textarea>
    </div>
    <div class="actions">
        <button type="button" class="add ui blue basic button">{{ content.add_button }}</button> 
        <button type="button" class="remove ui red basic button">{{ content.remove_button }}</button>
    </div>
</div>
</div>
<button class="ui green button">{{ content.submit_button }}</button>
</div>
</form>
<script language='javascript'>
var regex = /^(.+?)(\d+)$/i;
var cloneIndex = $(".titleandnote").length;

function clone(){
    $(this).parents(".titleandnote").clone()
        .appendTo("div.titlesandnotes")
        .attr("id", "titleandnote" +  cloneIndex)
        .find("*")
        .each(function() {
            var id = this.id || "";
            var match = id.match(regex) || [];
            if (match.length == 3) {
                this.id = match[1] + (cloneIndex);
            }
        })
        .on('click', 'button.add', clone)
        .on('click', 'button.remove', remove);
    cloneIndex++;
}<commit_msg>Visual tweak<commit_after>{% extends 'requestoid/base.html' %}
{% block content %}
<h1>{{ content.headline }}</h1>
<form action="/requests/{{ language }}/bulk" method="post">
{% csrf_token %}
<div class="ui form">
<div id="titlesandnotes" class="titlesandnotes">
<div id="titleandnote1" class="titleandnote">
    <div class="field">
        <label for="pagetitle" class="">{{ content.page_title_label }}</label>
        <input type="text" class="" name="pagetitle[]" id="pagetitle1"></input>
    </div>
    <div class="field">
        <label for="note" class="">{{ content.add_a_note }}</label>
        <textarea class="" name="note[]" id="note1"></textarea>
    </div>
    <div class="field">
        <button type="button" class="add ui blue basic button">{{ content.add_button }}</button> 
        <button type="button" class="remove ui red basic button">{{ content.remove_button }}</button>
    </div>
</div>
</div>
<button class="ui green button">{{ content.submit_button }}</button>
</div>
</form>
<script language='javascript'>
var regex = /^(.+?)(\d+)$/i;
var cloneIndex = $(".titleandnote").length;

function clone(){
    $(this).parents(".titleandnote").clone()
        .appendTo("div.titlesandnotes")
        .attr("id", "titleandnote" +  cloneIndex)
        .find("*")
        .each(function() {
            var id = this.id || "";
            var match = id.match(regex) || [];
            if (match.length == 3) {
                this.id = match[1] + (cloneIndex);
            }
        })
        .on('click', 'button.add', clone)
        .on('click', 'button.remove', remove);
    cloneIndex++;
}
{'fraction_non_alphanumeric': 0.21144823271817328, 'fraction_numerical': 0.004379105411323116, 'mean_word_length': 3.131782945736434, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '4652665', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1012, 'n_words': 229}