<commit_before>{% extends 'PROCERGSVPRCoreBundle::base.html.twig' %}

{% block header %}
{{ parent() }}

<div class="ballot-nav">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <span class="pull-left">{% trans with {'%max%': step.getMaxSelection} %}Choose up to <span class='itens-count'>%max%</span> items{% endtrans %}</span>

                <div class="btn-group">
                    <button type="button" id="btn-categories" class="btn btn-default dropdown-toggle" data-toggle="dropdown">{% trans %}Categories{% endtrans %}<span class="caret"></span></button>
                    <ul class="dropdown-menu dropdown-menu-right" role="menu" id="dropdown-categories">
            {% for category,id in categoriesId %}
                        <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="#ctg-{{ attribute(categoriesId, category) }}" class="scrollTo">
                                <span class="ctg-{{id}}"><i class="icon"></i>{{category}}</span>
                            </a>
                        </li>
            {% endfor %}
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="alert-limit" tabindex="-1" role="dialog" aria-labelledby="maxSelectionWarning" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="maxSelectionWarning">{{ 'Warning!'|trans }}</h4>
            </div>
            <div class="modal-body">
                {% set maxSelection = step.getMaxSelection %}
                {% transchoice maxSelection %}
                {0} You can't select any options|{1} You can select up to one option|]1,Inf] You can select up to %maxSelection% options
                {% endtranschoice %}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">{{ 'Ok'|trans }}</button>
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block body %}
<div class="row">
    <div class="col-md-12">
        <h2 class="main-title">{{ 'Ballot for %name%'| trans({'%name%' : corede.name}) }}</h2>
        <div class="alert alert-danger confirm-message" style="display:none">{% trans %}Please review your choices and click confirm to proceed or rectify to correct them.{% endtrans %}</div>

        <div class="inner-content">
        {{ form_start(form, {'attr' : {'role' : 'form', 'class' : 'ac-custom ac-checkmark'}}) }}
            {{ form_errors(form) }}

        {% if options %}
            {% image '@PROCERGSVPRCoreBundle/Resources/public/images/ajax-loader.gif' %}
            <img src="{{ asset_url }}" alt="{%trans%}Loading{%endtrans%}" class="loader" width="43" height="11">
            {% endimage %}

            <div class="ballot">
                <dl class="steps">
                {% for currStep,categories in options %}
                    <dt class="step-title">{{ currStep }}</dt>
                    <dd>
                        <dl>
                        {% for category,pollOptions in categories %}
                            <dt class="step-category ctg-{{ attribute(categoriesId, category) }}">
                                <span class="icon"><i class="img"></i></span>
                                <a class="title" name="ctg-{{ attribute(categoriesId, category) }}">{{ category }}</a>
                            </dt>
                            {% for option in pollOptions %}
                            <dd class="option">
                                <div class="content ctg-{{ attribute(categoriesId, category) }}">
                                    <input type="checkbox" id="option_{{ option.id }}" name="options[]" value="{{ option.id }}"/>
                                    <label for="option_{{ option.id }}">{{ option.title |trans }}</label>
                                    {% if option.description %}<span class="desc-toggle"></span>{% endif %}
                                </div>
                                {% if option.description %}<div class="desc">{{ option.description }}</div>{% endif %}
                            </dd>
                            {% endfor %}
                        {% endfor %}
                        </dl>
                    </dd>
                {% endfor %}
                </dl>
                <div class="alert alert-danger hidden" id="vote-empty">Nenhuma opção selecionada</div>

                <div id="confirmation" class="confirmation-buttons" style="display:none">
                    <button id="btn-confirm" type="submit" class="btn btn-success btn-lg">{{ 'Confirm' | trans }}</button>
                    <button id="btn-rectify" type="button" class="btn btn-warning btn-lg">{{ 'Rectify' | trans }}</button>
                </div>
            </div>

      {% endif %}

            <div id="button-bar"><commit_msg>full title<commit_after>{% extends 'PROCERGSVPRCoreBundle::base.html.twig' %}

{% block header %}
{{ parent() }}

<div class="ballot-nav">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <span class="pull-left">{% trans with {'%max%': step.getMaxSelection} %}Choose up to <span class='itens-count'>%max%</span> items{% endtrans %}</span>

                <div class="btn-group">
                    <button type="button" id="btn-categories" class="btn btn-default dropdown-toggle" data-toggle="dropdown">{% trans %}Categories{% endtrans %}<span class="caret"></span></button>
                    <ul class="dropdown-menu dropdown-menu-right" role="menu" id="dropdown-categories">
            {% for category,id in categoriesId %}
                        <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="#ctg-{{ attribute(categoriesId, category) }}" class="scrollTo">
                                <span class="ctg-{{id}}"><i class="icon"></i>{{category}}</span>
                            </a>
                        </li>
            {% endfor %}
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="alert-limit" tabindex="-1" role="dialog" aria-labelledby="maxSelectionWarning" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="maxSelectionWarning">{{ 'Warning!'|trans }}</h4>
            </div>
            <div class="modal-body">
                {% set maxSelection = step.getMaxSelection %}
                {% transchoice maxSelection %}
                {0} You can't select any options|{1} You can select up to one option|]1,Inf] You can select up to %maxSelection% options
                {% endtranschoice %}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">{{ 'Ok'|trans }}</button>
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block body %}
<div class="row">
    <div class="col-md-12">
        <h2 class="main-title">{{ 'Ballot for %name%'| trans({'%name%' : corede.name}) }}</h2>
        <div class="alert alert-danger confirm-message" style="display:none">{% trans %}Please review your choices and click confirm to proceed or rectify to correct them.{% endtrans %}</div>

        <div class="inner-content">
        {{ form_start(form, {'attr' : {'role' : 'form', 'class' : 'ac-custom ac-checkmark'}}) }}
            {{ form_errors(form) }}

        {% if options %}
            {% image '@PROCERGSVPRCoreBundle/Resources/public/images/ajax-loader.gif' %}
            <img src="{{ asset_url }}" alt="{%trans%}Loading{%endtrans%}" class="loader" width="43" height="11">
            {% endimage %}

            <div class="ballot">
                <dl class="steps">
                {% for currStep,categories in options %}
                    <dt class="step-title">{{ currStep }}</dt>
                    <dd>
                        <dl>
                        {% for category,pollOptions in categories %}
                            <dt class="step-category ctg-{{ attribute(categoriesId, category) }}">
                                <span class="icon"><i class="img"></i></span>
                                <a class="title" name="ctg-{{ attribute(categoriesId, category) }}">{{ category }}</a>
                            </dt>
                            {% for option in pollOptions %}
                            <dd class="option">
                                <div class="content ctg-{{ attribute(categoriesId, category) }}">
                                    <input type="checkbox" id="option_{{ option.id }}" name="options[]" value="{{ option.id }}"/>
                                    <label for="option_{{ option.id }}">{{ option.getCategorySorting}} - {{ option.title |trans }}
                                    {% if option.cost is not null and option.cost > 0 %}
                                    - {{ 'Valor: R$'|trans }} {{ option.cost|number_format(2, ',', '.') }}
                                    {% endif %}
                                    </label>
                                    {% if option.description %}<span class="desc-toggle"></span>{% endif %}
                                </div>
                                {% if option.description %}<div class="desc">{{ option.description }}</div>{% endif %}
                            </dd>
                            {% endfor %}
                        {% endfor %}
                        </dl>
                    </dd>
                {% endfor %}
                </dl>
                <div class="alert alert-danger hidden" id="vote-empty">Nenhuma opção selecionada</div>

                <div id="confirmation" class="confirmation-buttons" style="display:none">
                    <button id="btn-confirm" type="submit" class="btn btn-success btn-lg">{{ 'Confirm' | trans }}</button>
                    <button id="btn-rectify" type="button" class="btn btn-warning btn-lg">{{ 'Rectify' | trans }}</button>
                </div>
            </div>

      {% endif %}

            <div id="button-bar">
{'fraction_non_alphanumeric': 0.16749929305306815, 'fraction_numerical': 0.003393345272881516, 'mean_word_length': 1.6598144898470795, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 188, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3634387', 'n_tokens_mistral': 2992, 'n_tokens_neox': 2738, 'n_words': 635}