<commit_before>{% extends "templates/index.html" %}

{% block header %}
{% endblock %}

{% block content %}

{% if page_info.contest %}
<form action={% url contest_subpage_create page_info.contest.id %} method="POST">
{% else %}
<form action={% url subpage_create %} method="POST">
{% endif %}

<input name="fid" value="{{ fid }}" type="hidden">
<table>
{{ form.as_table }}
</table>
<input id="create_subpage" type="submit" value="Add"/>
</form>
<form id="file_upload" action={% url contest_subpage_fileupload page_info.contest.id %} method="POST" enctype="multipart/form-data" class="file_upload">
    <input type="file" name="file" multiple>
    <input name="fid" value="{{ fid }}" type="hidden">
    <button>Upload</button>
    <div>Attachments</div>
</form>
<table id="files"></table>
<script src="/files/scripts/attachments_upload.js"></script>
<script>createFileUploadInstance('{{ fid }}', '{% url contest_subpage_fileremove page_info.contest.id %}');</script>
{% endblock %}
<commit_msg>Modified look of the "contest create subpage" page.<commit_after>{% extends "templates/index.html" %}

{% block header %}
{% endblock %}

{% block content %}

{% if page_info.contest %}
<form action={% url contest_subpage_create page_info.contest.id %} method="POST">
{% else %}
<form action={% url subpage_create %} method="POST">
{% endif %}

<input name="fid" value="{{ fid }}" type="hidden">
<table class="subpage_form">
    <tr>
        <th><label for="id_name">Subpage name:</label></th>
        <td>{{ form.name }}</td>
        <td style="text-align: right">
            <input id="create_subpage" type="submit" value="Create subpage"/></td>
    </tr>
    <tr>
        <th><label for="id_content">Content:</label></th>
        <td colspan="2">{{ form.content }}</td>
    </tr>
    <tr>
        <th><label for="id_is_public">Show to all visitors:</label></th>
        <td>{{ form.is_public }}</td>
    </tr>
</table>
</form>
<h4>Attachments</h4>
<p>Click to select or drag-and-drop multiple files on the upload field:</p>
<form id="file_upload" action={% url contest_subpage_fileupload page_info.contest.id %} method="POST" enctype="multipart/form-data" class="file_upload">
    <input type="file" name="file" multiple>
    <input name="fid" value="{{ fid }}" type="hidden">
    <button>Upload</button>
    <div>Attachments</div>
</form>
<table id="files"></table>
<script src="/files/scripts/attachments_upload.js"></script>
<script>createFileUploadInstance('{{ fid }}', '{% url contest_subpage_fileremove page_info.contest.id %}');</script>
{% endblock %}

{'fraction_non_alphanumeric': 0.2040656763096169, 'fraction_numerical': 0.0011727912431587178, 'mean_word_length': 4.882758620689655, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '3515989', 'n_tokens_mistral': 894, 'n_tokens_neox': 852, 'n_words': 185}