<commit_before>@script('widget', 'system/js/widgets/edit.js', 'requirejs')

<form class="js-widget uk-form" action="@url.route('@system/widgets/save', ['id' => widget.id ?: 0])" method="post">

    <div class="pk-toolbar">
        <button class="uk-button uk-button-primary" type="submit">@trans('Save')</button>
        <a class="uk-button" href="@url.route('@system/widgets/index')">@(widget.id ? trans('Close') : trans('Cancel'))</a>
    </div>

    <div class="uk-grid uk-grid-divider" data-uk-grid-margin data-uk-grid-match>
        <div class="uk-width-medium-3-4">

            <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
                <li><a href="#">@trans('Settings')</a></li>
                <li><a href="#">@trans('Assignment')</a></li>
                @foreach (additionals as name => settings)
                <li><a href="#">@name</a></li>
                @endforeach
            </ul>

            <ul id="tab-content" class="uk-switcher uk-margin">
                <li class="uk-form-stacked">

                    <div class="uk-form-row">
                        <label for="form-title" class="uk-form-label">@trans('Title')</label>
                        <div class="uk-form-controls">
                            <p class="uk-form-controls-condensed">
                                <input id="form-title" class="uk-width-1-1 uk-form-large" type="text" name="widget[title]" value="@widget.title" required>
                            </p>
                        </div>
                    </div>

                    @set (type = app.widgets.types[widget.type])
                    @type.renderForm(widget)

                </li>
                <li class="uk-form-horizontal">

                    @foreach (app.menus as id => menu)
                    @if (menu.items)
                    <div class="uk-form-row">
                        <label for="form-h-it" class="uk-form-label">@menu.name @trans('Menu')</label>
                        <div class="uk-form-controls uk-form-controls-text">
                        @include('view://system/admin/widgets/select.razr.php', ['root' => app.menus.getTree(menu), 'widget' => widget])
                        </div>
                    </div>
                    @endif
                    @endforeach

                    <div class="uk-form-row">
                        <label for="form-pages" class="uk-form-label">@trans('Pattern')</label>
                        <div class="uk-form-controls">
                            <textarea id="form-pages" class="uk-form-width-large" name="widget[pages]" rows="5">@widget.pages</textarea>
                            <p class="uk-form-help-block">@trans('Enter one page path per line. The "*" character is a wildcard. Exclude pages by prepending an exclamation mark to the path. Example paths: "blog" for the blog page, "blog/*" for blog entries or "!blog" if you want to exclude the blog.')</p>
                        </div>
                    </div>

                    <input type="hidden" name="widget[menuItems][]" value="">

                </li>
                @foreach (additionals as settings)
                <li class="uk-form-horizontal">
                    @settings
                </li>
                @endforeach
            </ul>

            <input type="hidden" name="widget[type]" value="@widget.type">

        </div><commit_msg>cleanup form style in widget edit<commit_after>@script('widget', 'system/js/widgets/edit.js', 'requirejs')

<form class="js-widget uk-form" action="@url.route('@system/widgets/save', ['id' => widget.id ?: 0])" method="post">

    <div class="pk-toolbar">
        <button class="uk-button uk-button-primary" type="submit">@trans('Save')</button>
        <a class="uk-button" href="@url.route('@system/widgets/index')">@(widget.id ? trans('Close') : trans('Cancel'))</a>
    </div>

    <div class="uk-grid uk-grid-divider" data-uk-grid-margin data-uk-grid-match>
        <div class="uk-width-medium-3-4">

            <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
                <li><a href="#">@trans('Settings')</a></li>
                <li><a href="#">@trans('Assignment')</a></li>
                @foreach (additionals as name => settings)
                <li><a href="#">@name</a></li>
                @endforeach
            </ul>

            <ul id="tab-content" class="uk-switcher uk-margin">
                <li>

                    <div class="uk-form-stacked">
                        <div class="uk-form-row">
                            <div class="uk-form-controls">
                                <p class="uk-form-controls-condensed">
                                    <input id="form-title" class="uk-width-1-1 uk-form-large" type="text" name="widget[title]" value="@widget.title" required>
                                </p>
                            </div>
                        </div>
                    </div>

                    @set (type = app.widgets.types[widget.type])
                    @type.renderForm(widget)

                </li>
                <li class="uk-form-horizontal">

                    @foreach (app.menus as id => menu)
                    @if (menu.items)
                    <div class="uk-form-row">
                        <label for="form-h-it" class="uk-form-label">@menu.name @trans('Menu')</label>
                        <div class="uk-form-controls uk-form-controls-text">
                        @include('view://system/admin/widgets/select.razr.php', ['root' => app.menus.getTree(menu), 'widget' => widget])
                        </div>
                    </div>
                    @endif
                    @endforeach

                    <div class="uk-form-row">
                        <label for="form-pages" class="uk-form-label">@trans('Pattern')</label>
                        <div class="uk-form-controls">
                            <textarea id="form-pages" class="uk-form-width-large" name="widget[pages]" rows="5">@widget.pages</textarea>
                            <p class="uk-form-help-block">@trans('Enter one page path per line. The "*" character is a wildcard. Exclude pages by prepending an exclamation mark to the path. Example paths: "blog" for the blog page, "blog/*" for blog entries or "!blog" if you want to exclude the blog.')</p>
                        </div>
                    </div>

                    <input type="hidden" name="widget[menuItems][]" value="">

                </li>
                @foreach (additionals as settings)
                <li>
                    @settings
                </li>
                @endforeach
            </ul>

            <input type="hidden" name="widget[type]" value="@widget.type">

        </div>
{'fraction_non_alphanumeric': 0.16622340425531915, 'fraction_numerical': 0.0017730496453900709, 'mean_word_length': 1.530467289719626, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6032070', 'n_tokens_mistral': 1965, 'n_tokens_neox': 1819, 'n_words': 362}