<commit_before>{% import 'TimeBoxMainBundle:Macro:folderTree.html.twig' as macros %}

<h4>Enter the new name</h4>

<form class="rename" action="{ { path('time_box_main_file_rename') }}" method="post">
    <div class="form-group">
        <input class="form-control" placeholder="Name" name="newName" value=""/>
        <input type="hidden" name="filesId" value="{ { filesId }}"/>
        <input type="hidden" name="foldersId" value="{ { foldersId }}"/>
        <input type="hidden" name="currentFolderId" value="{ { folderId }}"/>
    </div>
    <div class="form-group">
        <input class="btn btn-primary" type="submit" value="Ok"/>
    </div>
</form>

<script type="text/javascript">
    $("form.rename").submit(function() {
        var fileName = $("input[name=newName]").val();
        var pattern = new RegExp("^[a-zA-Z0-9_\-]+$") ;
        if (!pattern.test(fileName)) {
            alert("Error in the name !");
            return false;
        }
    });
</script><commit_msg>Fixed typo<commit_after>{% import 'TimeBoxMainBundle:Macro:folderTree.html.twig' as macros %}

<h4>Enter the new name</h4>

<form class="rename" action="{{ path('time_box_main_file_rename') }}" method="post">
    <div class="form-group">
        <input class="form-control" placeholder="Name" name="newName" value=""/>
        <input type="hidden" name="filesId" value="{{ filesId }}"/>
        <input type="hidden" name="foldersId" value="{{ foldersId }}"/>
        <input type="hidden" name="currentFolderId" value="{{ folderId }}"/>
    </div>
    <div class="form-group">
        <input class="btn btn-primary" type="submit" value="Ok"/>
    </div>
</form>

<script type="text/javascript">
    $("form.rename").submit(function() {
        var fileName = $("input[name=newName]").val();
        var pattern = new RegExp("^[a-zA-Z0-9_\-]+$") ;
        if (!pattern.test(fileName)) {
            alert("Error in the name !");
            return false;
        }
    });
</script>
{'fraction_non_alphanumeric': 0.20538891713268936, 'fraction_numerical': 0.004067107269954245, 'mean_word_length': 3.296943231441048, 'pattern_counts': {'":': 0, '<': 33, '<?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': '6081833', 'n_tokens_mistral': 632, 'n_tokens_neox': 627, 'n_words': 130}