<commit_before>{% extends 'AppBundle::layout.html.twig' %}

{% block javascripts %}
    {{ parent() }}
<script src="{{ asset('bundles/app/js/bootstrap-filestyle.min.js') }}"></script>
<script language="javascript">
    $(document).ready(function () {
        $(":file").filestyle();
        $('#sustain_appbundle_file_file').on('change', function () {
            var filename = $('input[type=file]').val().replace(/C:\\fakepath\\/i, '');
            var file = filename.substr(0, filename.lastIndexOf('.')) || filename;
            $('#sustain_appbundle_file_name').val(file);
            var a=(this.files[0].size/1024/1024);
            var filesize = Math.round(a * 100) / 100
            if(a > 10) {
                alert('Your file is ' + filesize + ' MB.  It must be no larger than 10 MB.');
            };
        });
    });
</script>
{% endblock %}

{% block body -%}
    <div class="col-sm-8">
        <div class="panel panel-default">
            <div class="panel-heading">
                <button id="close_form" type="button" class="close">&times;</button>
                <h2 class="panel-title small">Upload</h2>
            </div>
            <div class="panel-body">
                {{ form(form) }}
            </div><commit_msg>upload size check<commit_after>{% extends 'AppBundle::layout.html.twig' %}

{% block javascripts %}
    {{ parent() }}
<script src="{{ asset('bundles/app/js/bootstrap-filestyle.min.js') }}"></script>
<script language="javascript">
    $(document).ready(function () {
        $(":file").filestyle();
        $('#sustain_appbundle_file_file').on('change', function () {
            var filename = $('input[type=file]').val().replace(/C:\\fakepath\\/i, '');
            var file = filename.substr(0, filename.lastIndexOf('.')) || filename;
            $('#sustain_appbundle_file_name').val(file);
            var a=(this.files[0].size/1024/1024);
            var filesize = Math.round(a * 100) / 100
            if(a > 30) {
                alert('Your file is ' + filesize + ' MB.  It must be no larger than 30 MB.');
            };
        });
    });
</script>
{% endblock %}

{% block body -%}
    <div class="col-sm-8">
        <div class="panel panel-default">
            <div class="panel-heading">
                <button id="close_form" type="button" class="close">&times;</button>
                <h2 class="panel-title small">Upload</h2>
            </div>
            <div class="panel-body">
                {{ form(form) }}
            </div>
{'fraction_non_alphanumeric': 0.19568690095846644, 'fraction_numerical': 0.018370607028753993, 'mean_word_length': 2.1910828025477707, 'pattern_counts': {'":': 2, '<': 31, '<?xml version=': 0, '>': 33, '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': '824426', 'n_tokens_mistral': 798, 'n_tokens_neox': 743, 'n_words': 141}