<commit_before><div class="modal fade" id="gh-borrow-series-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="modal-title">Borrow series</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal gh-chosen-inverted">
                    <select id="gh-borrow-series-tripos" class="chosen-select" data-placeholder="Choose a Tripos" style="display: none; width: 300px;" tabindex="0">
                        <% var randomId = data.gh.utils.generateRandomString() %>
                        <option id="<%- randomId %>">
                            <% _.partial('subheader-picker', {'data': data}, null, '#' + randomId) %>
                        </option>
                    </select>
                    <select id="gh-borrow-series-part" class="chosen-select" data-placeholder="Choose a part/paper" style="display: none; width: 160px;" tabindex="0">
                        <% randomId = data.gh.utils.generateRandomString() %>
                        <div id="<%- randomId %>">
                            <% _.partial('subheader-part', {'data': data}, null, '#' + randomId) %>
                        </div>
                    </select>
                </form>

                <div id="gh-modules-container">
                    <div id="gh-modules-list-container">
                        <ul id="gh-modules-list" class="list-group"><!-- --></ul>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-link pull-left" data-dismiss="modal">Cancel</button>
                <button type="button" id="gh-borrow-series-submit" class="btn btn-default pull-right" data-moduleid="<%= data.moduleId %>" data-partid="<%= data.partId %>">Borrow</button>
            </div>
        </div>
    </div>
</div>

<script id="gh-borrow-series-modules-template" type="text/template">
    <div id="gh-modules-list-container">
        <ul id="gh-modules-list" class="list-group">
            <%= _.partial('admin-borrow-series-module-item', {'data': data.triposPickerData}, false) %>
        </ul>
    </div>
</script><commit_msg>Fix issue with borrowing twice without page reload<commit_after><div class="modal fade" id="gh-borrow-series-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="modal-title">Borrow series</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal gh-chosen-inverted">
                    <select id="gh-borrow-series-tripos" class="chosen-select" data-placeholder="Choose a Tripos" style="display: none; width: 300px;" tabindex="0">
                        <% var randomId = data.gh.utils.generateRandomString() %>
                        <option id="<%- randomId %>">
                            <% _.partial('subheader-picker', {'data': data}, null, '#' + randomId) %>
                        </option>
                    </select>
                    <select id="gh-borrow-series-part" class="chosen-select" data-placeholder="Choose a part/paper" style="display: none; width: 160px;" tabindex="0">
                        <% randomId = data.gh.utils.generateRandomString() %>
                        <div id="<%- randomId %>">
                            <% _.partial('subheader-part', {'data': data}, null, '#' + randomId) %>
                        </div>
                    </select>
                </form>

                <div id="gh-modules-container">
                    <div id="gh-modules-list-container">
                        <ul id="gh-modules-list" class="list-group"><!-- --></ul>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-link pull-left" data-dismiss="modal">Cancel</button>
                <button type="button" id="gh-borrow-series-submit" class="btn btn-default pull-right" data-moduleid="<%= data.moduleId %>" data-partid="<%= data.partId %>">Borrow</button>
            </div>
        </div>
    </div>
</div>

<script id="gh-borrow-series-modules-template" type="text/template">
    <div id="gh-modules-list-container">
        <ul id="gh-modules-list" class="list-group">
            <% var randomId = data.gh.utils.generateRandomString() %>
            <div id="<%- randomId %>">
                <% _.partial('admin-borrow-series-module-item', {'data': data.triposPickerData}, null, '#' + randomId) %>
            </div>
        </ul>
    </div>
</script>
{'fraction_non_alphanumeric': 0.1770813305133628, 'fraction_numerical': 0.004229955777735051, 'mean_word_length': 1.9175546831183399, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, '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': '1086915', 'n_tokens_mistral': 1536, 'n_tokens_neox': 1426, 'n_words': 268}