<commit_before>{% import 'OroUIBundle::macros.html.twig' as UI %}
<div class="widget-content">
    {% if saved %}
        <script type="text/javascript">
            require(['oroui/js/widget-manager', 'oroui/js/mediator'],
            function(widgetManager, mediator) {
                widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {
                    mediator.trigger('auto_response_rule:save', {{ form.vars.value.id }});
                    mediator.trigger('widget_success:' + widget.getWid());
                    mediator.trigger('widget_success:' + widget.getAlias());
                    widget.remove();
                });
            });
        </script>
    {% else %}
        {% set pageComponent = {
                'module': 'oroui/js/app/components/view-component',
                'options': {'view': 'oroemail/js/app/views/email-template-editor-view'},
                'layout': 'separate'
            }
        %}
        <div class="form-container" {{ UI.renderPageComponentAttributes(pageComponent) }}>
            {{ form_start(
                    form,
                    {action: path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')),}
                )
            }}
                <fieldset class="form form-horizontal">
                    <div class="span8">
                        {{ form_rest(form) }}
                    </div>
                    <div class="widget-actions form-actions" style="display: none;">
                        <button class="btn" type="reset">{{ 'Cancel'|trans }}</button>
                        {% set label = form.vars.data.id ? 'Update' : 'Add' %}
                        <button class="btn btn-primary" type="submit">{{ label|trans }}</button>
                    </div>
                </fieldset>
            {{ form_end(form) }}
        </div>
    {% endif %}
</div>
<commit_msg>BAP-8839: Fix type switcher at edit rule page -- review fixes<commit_after>{% import 'OroUIBundle::macros.html.twig' as UI %}
<div class="widget-content">
    {% if saved %}
        <script type="text/javascript">
            require(['oroui/js/widget-manager', 'oroui/js/mediator'],
            function(widgetManager, mediator) {
                widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {
                    mediator.trigger('auto_response_rule:save', {{ form.vars.value.id }});
                    mediator.trigger('widget_success:' + widget.getWid());
                    mediator.trigger('widget_success:' + widget.getAlias());
                    widget.remove();
                });
            });
        </script>
    {% else %}
        {% set pageComponent = {
            'module': 'oroui/js/app/components/view-component',
            'options': {'view': 'oroemail/js/app/views/email-template-editor-view'},
            'layout': 'separate'
        } %}
        <div class="form-container" {{ UI.renderPageComponentAttributes(pageComponent) }}>
            {{ form_start(
                form,
                {
                    action: path(
                        app.request.attributes.get('_route'),
                        app.request.attributes.get('_route_params')
                    )
                }
            ) }}
                <fieldset class="form form-horizontal">
                    <div class="span8">
                        {{ form_rest(form) }}
                    </div>
                    <div class="widget-actions form-actions" style="display: none;">
                        <button class="btn" type="reset">{{ 'Cancel'|trans }}</button>
                        {% set label = form.vars.data.id ? 'Update' : 'Add' %}
                        <button class="btn btn-primary" type="submit">{{ label|trans }}</button>
                    </div>
                </fieldset>
            {{ form_end(form) }}
        </div>
    {% endif %}
</div>

{'fraction_non_alphanumeric': 0.1534019583228722, 'fraction_numerical': 0.001506402209389907, 'mean_word_length': 1.573643410852713, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '2019526', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1027, 'n_words': 166}