<commit_before>{% extends 'form_div_layout.html.twig' %}
{% from 'MopaBootstrapBundle::flash.html.twig' import flash %}

{# Buttons #}
{% block button_attributes %}
    {% set attr = attr|merge({class: 'btn ' ~ attr.class | default("")}) %}
    {{ parent() }}
{% endblock button_attributes %}

{% block button_widget %}
{% spaceless %}
    {% if label is empty %}
        {% set label = name|humanize %}
    {% endif %}
    <button type="{{ type|default('button') }}" {{ block('button_attributes') }}>
    {% if icon is not empty %} <i class="icon-{{ icon }}"{% if icon_color is not empty %} style="color: {{ icon_color }};" {% endif %} ></i> {% endif %} {{ label|trans({}, translation_domain) }}</button>
{% endspaceless %}
{% endblock button_widget %}

{# Widgets #}

{% block form_widget_simple %}
{% spaceless %}
    {% set type = type|default('text') %}
    {% if type != 'hidden' and widget_addon.type|default(null) is not null %}
    <div class="input-{{ widget_addon.type }}">
        {% if widget_addon.type == 'prepend' %}
        {{ block('widget_addon') }}
        {% endif %}
    {% endif %}
    {% if not widget_remove_btn|default(null) %}
        {% set attr = attr|merge({'class': attr.class|default('') ~ ' not-removable'}) %}
    {% endif %}
    <input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
    {% if type != 'hidden' and  widget_addon.type|default(null) is not null %}
        {% if widget_addon.type == 'append' %}
        {{ block('widget_addon') }}
        {% endif %}
    </div>
    {% endif %}
{% endspaceless %}
{% endblock form_widget_simple %}

{% block form_widget_compound %}
{% spaceless %}
    {% if form.parent == null %}
        {% if render_fieldset %}<fieldset>{% endif %}
        {% if show_legend %}{{ block('form_legend') }}{% endif %}
    {% endif %}

    {% if form.vars.tabbed and not form.vars.tabsView.rendered %}
        {{ form_tabs(form) }}
    {% endif %}

    {% if form.vars.tabbed %}
        <div class="tab-content">
    {% endif %}
    {{ block('form_rows_visible') }}
    {% if form.vars.tabbed %}
        </div>
    {% endif %}

    {{ form_rest(form) }}

    {% if form.parent == null %}
        {% if render_fieldset %}</fieldset>{% endif %}
    {% endif %}
{% endspaceless %}
{% endblock form_widget_compound %}

{% block form_tabs %}
{% if form.vars.tabsView is defined %}
{{ form_widget(form.vars.tabsView) }}
{% endif %}
{% endblock %}
<commit_msg>Simplified views some more.<commit_after>{% extends 'form_div_layout.html.twig' %}
{% from 'MopaBootstrapBundle::flash.html.twig' import flash %}

{# Buttons #}
{% block button_attributes %}
    {% set attr = attr|merge({class: 'btn ' ~ attr.class | default("")}) %}
    {{ parent() }}
{% endblock button_attributes %}

{% block button_widget %}
{% spaceless %}
    {% if label is empty %}
        {% set label = name|humanize %}
    {% endif %}
    <button type="{{ type|default('button') }}" {{ block('button_attributes') }}>
    {% if icon is not empty %} <i class="icon-{{ icon }}"{% if icon_color is not empty %} style="color: {{ icon_color }};" {% endif %} ></i> {% endif %} {{ label|trans({}, translation_domain) }}</button>
{% endspaceless %}
{% endblock button_widget %}

{# Widgets #}

{% block form_widget_simple %}
{% spaceless %}
    {% set type = type|default('text') %}
    {% if type != 'hidden' and widget_addon.type|default(null) is not null %}
    <div class="input-{{ widget_addon.type }}">
        {% if widget_addon.type == 'prepend' %}
        {{ block('widget_addon') }}
        {% endif %}
    {% endif %}
    {% if not widget_remove_btn|default(null) %}
        {% set attr = attr|merge({'class': attr.class|default('') ~ ' not-removable'}) %}
    {% endif %}
    <input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
    {% if type != 'hidden' and  widget_addon.type|default(null) is not null %}
        {% if widget_addon.type == 'append' %}
        {{ block('widget_addon') }}
        {% endif %}
    </div>
    {% endif %}
{% endspaceless %}
{% endblock form_widget_simple %}

{% block form_widget_compound %}
{% spaceless %}
    {% if form.parent == null %}
        {% if render_fieldset %}<fieldset>{% endif %}
        {% if show_legend %}{{ block('form_legend') }}{% endif %}
    {% endif %}

    {% if form.vars.tabbed %}
        {{ form_tabs(form) }}
        <div class="tab-content">
    {% endif %}
    {{ block('form_rows_visible') }}
    {% if form.vars.tabbed %}
        </div>
    {% endif %}

    {{ form_rest(form) }}

    {% if form.parent == null %}
        {% if render_fieldset %}</fieldset>{% endif %}
    {% endif %}
{% endspaceless %}
{% endblock form_widget_compound %}

{% block form_tabs %}
{% if form.vars.tabsView is defined %}
{{ form_widget(form.vars.tabsView) }}
{% endif %}
{% endblock %}

{'fraction_non_alphanumeric': 0.2059244126659857, 'fraction_numerical': 0.0, 'mean_word_length': 3.1526717557251906, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6596699', 'n_tokens_mistral': 1819, 'n_tokens_neox': 1547, 'n_words': 345}