<commit_before>{% extends 'MopaBootstrapBundle:Form:fields.html.twig' %}

{% block date_widget %}
{% spaceless %}
{% if widget == 'single_text' %}
    {% if datepicker is defined %}
        <div class="input-group date">
            {% if widget_addon_prepend|default(null) is not null %}
                {% set widget_addon = widget_addon_prepend %}
                {{ block('widget_addon') }}
            {% endif %}
            {% set attr = attr|merge({'class': attr.class|default('') ~ ' not-removable grd-white form-control'}) %}
            <input type="text" {{ block('widget_attributes') }} value="{{ value }}"  data-form="datepicker" data-date-format="{{ format|lower }}"/>
            {% if widget_addon_append|default(null) is not null %}
                {% set widget_addon = widget_addon_append %}
                {{ block('widget_addon') }}
            {% endif %}
            <script type="text/javascript">
                $(document).ready(function () {
                    $({{ id }}).datepicker({
                        format: "yyyy-mm-dd",
                        todayBtn: true,
                        autoclose: true,
                        todayHighlight: true
                    });
                    $({{ id }}).keydown(function(e) {
                        if(e.which == 27) {
                            $({{ id }}).datepicker('hide');
                                return false;
                            }
                        });
                });
            </script>
        </div>
    {% else %}
        {{ block('form_widget_simple') }}
    {% endif %}
    {{ block('form_message') }}
{% else %}
    {% set attr = attr|merge({'class': attr.class|default('inline')}) %}
        {{ date_pattern|replace({
            '{{ year }}':  form_widget(form.year, {'attr': {'class': attr.widget_class|default('') ~ ''}, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class|default('col-lg-3')}),
            '{{ month }}': form_widget(form.month, {'attr': {'class': attr.widget_class|default('') ~ ''}, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class|default('col-lg-3')}),
            '{{ day }}':   form_widget(form.day, {'attr': {'class': attr.widget_class|default('') ~ ''}, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class|default('col-lg-3')}),
        })|raw }}
    {{ block('form_message') }}
{% endif %}
{% endspaceless %}
{% endblock date_widget %}

{% block collection_widget %}
    {% spaceless %}
        <div class="collection-items">
            {{ block('form_widget') }}
        </div>
    {% endspaceless %}
{% endblock collection_widget %}<commit_msg>Override mopa's choice_widget_expanded and checkbox_widget blocks<commit_after>{% extends 'MopaBootstrapBundle:Form:fields.html.twig' %}

{% block date_widget %}
{% spaceless %}
{% if widget == 'single_text' %}
    {% if datepicker is defined %}
        <div class="input-group date">
            {% if widget_addon_prepend|default(null) is not null %}
                {% set widget_addon = widget_addon_prepend %}
                {{ block('widget_addon') }}
            {% endif %}
            {% set attr = attr|merge({'class': attr.class|default('') ~ ' not-removable grd-white form-control'}) %}
            <input type="text" {{ block('widget_attributes') }} value="{{ value }}"  data-form="datepicker" data-date-format="{{ format|lower }}"/>
            {% if widget_addon_append|default(null) is not null %}
                {% set widget_addon = widget_addon_append %}
                {{ block('widget_addon') }}
            {% endif %}
            <script type="text/javascript">
                $(document).ready(function () {
                    $({{ id }}).datepicker({
                        format: "yyyy-mm-dd",
                        todayBtn: true,
                        autoclose: true,
                        todayHighlight: true
                    });
                    $({{ id }}).keydown(function(e) {
                        if(e.which == 27) {
                            $({{ id }}).datepicker('hide');
                                return false;
                            }
                        });
                });
            </script>
        </div>
    {% else %}
        {{ block('form_widget_simple') }}
    {% endif %}
    {{ block('form_message') }}
{% else %}
    {% set attr = attr|merge({'class': attr.class|default('inline')}) %}
        {{ date_pattern|replace({
            '{{ year }}':  form_widget(form.year, {'attr': {'class': attr.widget_class|default('') ~ ''}, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class|default('col-lg-3')}),
            '{{ month }}': form_widget(form.month, {'attr': {'class': attr.widget_class|default('') ~ ''}, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class|default('col-lg-3')}),
            '{{ day }}':   form_widget(form.day, {'attr': {'class': attr.widget_class|default('') ~ ''}, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class|default('col-lg-3')}),
        })|raw }}
    {{ block('form_message') }}
{% endif %}
{% endspaceless %}
{% endblock date_widget %}

{% block collection_widget %}
    {% spaceless %}
        <div class="collection-items">
            {{ block('form_widget') }}
        </div>
    {% endspaceless %}
{% endblock collection_widget %}

{% block choice_widget_expanded %}
{% spaceless %}
    {% set label_attr = label_attr|merge({'class': (label_attr.class|default(''))}) %}
    {% set label_attr = label_attr|merge({'class': (label_attr.class ~ ' ' ~ (widget_type != '' ? (multiple ? 'checkbox' : 'radio') ~ '-' ~ widget_type : ''))}) %}
    {% if expanded %}
        {% set attr = attr|merge({'class': attr.class|default(horizontal_input_wrapper_class)}) %}
        {#<div {{ block('widget_container_attributes') }}>#}
        <div style="-webkit-column-count: 3; -moz-column-count: 3; column-count: 3; -webkit-column-gap: 20px; -moz-column-gap: 20px; column-gap: 20px;">
    {% endif %}
    {% for child in form %}
        {% if widget_type != 'inline' %}
        <div class="{{ multiple ? 'checkbox' : 'radio' }}">
        {% endif %}
            <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
                {{ form_widget(child, {'horizontal_label_class': horizontal_label_class, 'horizontal_input_wrapper_class': horizontal_input_wrapper_class, 'attr': {'class': attr.widget_class|default('')}}) }}
                {{ child.vars.label|trans({}, translation_domain) }}
            </label>
        {% if widget_type != 'inline' %}
        </div>
        {% endif %}
    {% endfor %}
    {{ block('form_message') }}
    {% if expanded %}
        </div>
    {% endif %}
{% endspaceless %}
{% endblock choice_widget_expanded %}

{% block checkbox_widget %}
{% spaceless %}
{% if label is not sameas(false) and label is empty %}
    {% set label = name|humanize %}
{% endif %}
{% if form.parent != null and 'choice' not in form.parent.vars.block_prefixes %}
{#<div class="{{ horizontal_input_wrapper_class}}">#}
<div>
    <div class="checkbox">
{% endif %}

{% if form.parent != null and 'choice' not in form.parent.vars.block_prefixes and label_render %}
    <label class="{% if inline is defined and inline %}checkbox-inline{% endif %}">
{% endif %}
        <input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %}/>
{% if form.parent != null and 'choice' not in form.parent.vars.block_prefixes %}
    {% if label_render and widget_checkbox_label in ['both', 'widget'] %}
        {{ label|trans({}, translation_domain) }}
    </label>
    {% endif %}
{% endif %}
{% if form.parent != null and 'choice' not in form.parent.vars.block_prefixes %}
    </div>
    {{ block('form_message') }}
</div>
{% endif %}
{% endspaceless %}
{% endblock checkbox_widget %}
{'fraction_non_alphanumeric': 0.18039808515998992, 'fraction_numerical': 0.0023935500125976316, 'mean_word_length': 2.4043739279588334, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, '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': '3502565', 'n_tokens_mistral': 2498, 'n_tokens_neox': 2227, 'n_words': 433}