<commit_before>{% block form_buttons %}
<form id="mass-buttons" onsubmit="return false">
    <div>
        <div class="btn-group inline">
            <button class="btn" id="btn_more_info"><i class="icon icon-list-alt"></i> Voir la fiche</button>
            <button class="btn" id="toggleImportModal"><i class="icon icon-hdd"></i> Importer un fichier</button>
            <button class="btn" id="deleteImport"><i class="icon icon-trash"></i> Supprimer un lot importé</button>

            {% set alert_count = client.getAlertCount()%}
            {% if alert_count %}
            <button rel="tooltip" title="{{alert_count}} alertes" class="btn" id="btn_client_alert">{% trans with {'%count%': alert_count } %}
                <span class="badge badge-warning">%count%</span> Alertes{% endtrans %}</button>
            {% endif%}

            {% if admin.isGranted('ROLE_CLIENT_TOOLS') %}
            {% set text_lock = blocked ? 'Verrouiller' : 'Déverrouiller' %}
            <button id="btn_locking" class="btn">
                <i class="icon icon-lock"></i> {{ text_lock|trans}}</button>
            {% endif %}
        </div>
    </div>
</form>

<div class="modal hide fade" id="importModal" tabindex="-1" role="dialog" aria-labelledby="importModalLabel"
     aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="importModalLabel">Importer un fichier</h3>
    </div>
    <div class="modal-body">
        <p>

        <form class="form-inline" id="importForm" method="post"
              action="{{ path('admin_sonata_clientoperations_'~active_tab~'_import', _filter_json) }}"
              enctype="multipart/form-data">
            <input id="inputFile" type="file" name="inputFile" style="display:none"/>
            <input id="inputFileCover" class="input-large" type="text"/>
            <a class="btn" onclick="$('input[id=inputFile]').click();">choisir le fichier</a>
        </form>
        <button class="btn"
                onclick="location.href='{{ path('admin_sonata_clientoperations_'~active_tab~'_blank', _filter_json) }}'">
            <i class="icon icon-exclamation-sign"></i> télécharger échantillon
        </button>
        </p>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">fermer</button>
        <button class="btn btn-primary" id="doImport">importer</button>
    </div>
</div>
<script type="text/javascript">
    {% if admin.isGranted('ROLE_CLIENT_TOOLS') %}
    $("#btn_locking").click(function () {<commit_msg>Feature #330 :: Clients Operations - Verrouiller - Intermediary step<commit_after>{% block form_buttons %}
<form id="mass-buttons" onsubmit="return false">
    <div>
        <div class="btn-group inline">
            <button class="btn" id="btn_more_info"><i class="icon icon-list-alt"></i> Voir la fiche</button>
            <button class="btn" id="toggleImportModal"><i class="icon icon-hdd"></i> Importer un fichier</button>
            <button class="btn" id="deleteImport"><i class="icon icon-trash"></i> Supprimer un lot importé</button>

            {% set alert_count = client.getAlertCount()%}
            {% if alert_count %}
            <button rel="tooltip" title="{{alert_count}} alertes" class="btn" id="btn_client_alert">{% trans with {'%count%': alert_count } %}
                <span class="badge badge-warning">%count%</span> Alertes{% endtrans %}</button>
            {% endif%}

            {% if admin.isGranted('ROLE_CLIENT_TOOLS') %}
            {% set text_lock = blocked ? 'Verrouiller' : 'Déverrouiller' %}
            <button id="btn_locking" class="btn">
                <i class="icon icon-lock"></i> {{ text_lock|trans}}</button>
            {% endif %}
        </div>
    </div>
</form>

<div class="modal hide fade" id="importModal" tabindex="-1" role="dialog" aria-labelledby="importModalLabel"
     aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="importModalLabel">Importer un fichier</h3>
    </div>
    <div class="modal-body">
        <p>

        <form class="form-inline" id="importForm" method="post"
              action="{{ path('admin_sonata_clientoperations_'~active_tab~'_import', _filter_json) }}"
              enctype="multipart/form-data">
            <input id="inputFile" type="file" name="inputFile" style="display:none"/>
            <input id="inputFileCover" class="input-large" type="text"/>
            <a class="btn" onclick="$('input[id=inputFile]').click();">choisir le fichier</a>
        </form>
        <button class="btn"
                onclick="location.href='{{ path('admin_sonata_clientoperations_'~active_tab~'_blank', _filter_json) }}'">
            <i class="icon icon-exclamation-sign"></i> télécharger échantillon
        </button>
        </p>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">fermer</button>
        <button class="btn btn-primary" id="doImport">importer</button>
    </div>
</div>
<script type="text/javascript">
    {% if admin.isGranted('ROLE_CLIENT_TOOLS') %}
    $("#btn_locking").click(function () {
        $('#btn_client_alert').click();return;
{'fraction_non_alphanumeric': 0.17997750281214847, 'fraction_numerical': 0.001687289088863892, 'mean_word_length': 3.1165123456790123, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, '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': '1378238', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1632, 'n_words': 313}