{{< core_form/element-template }}
    {{$label}}
        {{^element.hiddenlabel}}
            <label id="{{element.id}}_label" class="mb-0 word-break" aria-hidden="true">
                {{{label}}}
            </label>
        {{/element.hiddenlabel}}
    {{/label}}
    {{$element}}
        <fieldset>
            {{#label}}
                <legend class="sr-only">{{label}}</legend>
            {{/label}}
            <div class="d-flex flex-wrap align-items-center rui-form-element-group">
            {{#element.elements}}
                {{{separator}}}
                {{{html}}}
            {{/element.elements}}
            </div>
        </fieldset>
    {{/element}}
{{/ core_form/element-template }}
{{#js}}
require(['jquery'], function($) {
    $('#{{element.id}}_label').css('cursor', 'default');
    $('#{{element.id}}_label').click(function() {
        $('#{{element.id}}')
            .find('button, a, input:not([type="hidden"]), select, textarea, [tabindex]')
            .filter(':not([disabled]):not([tabindex="0"]):not([tabindex="-1"])')
            .first().focus();
    });
});
{{/js}}
