<form action="#" id="{{: formId}}">
<div class="grid-Table">
    <p class="grid-Row">
        <span class="grid-LabelCell">{{> ~loc('_ label.selection.content')}}</span>
        <span class="grid-ColonCell">{{colon/}} </span>
        <span class="grid-InputCell">
            <input type="text" name="q" value="{{> q}}" id="{{: formId}}_q1">
        </span>
    </p>
    <p class="grid-Row">
        <span class="grid-InputCell">
            <label><input type="radio" value="and" name="operator" {{if operator=="and"}}checked{{/if}}>{{> ~loc('_ label.global.and')}}</label>
            <label><input type="radio" value="or" name="operator" {{if operator=="or"}}checked{{/if}}>{{> ~loc('_ label.global.or')}}</label>
        </span>
    </p>
    <fieldset class="grid-Row grid-choice-Fieldset">
        <legend class="grid-choice-Legend grid-Ignore">
            <span class="grid-LabelCell">{{> ~loc('_ label.selection.scope')}}</span>
            <span class="grid-ColonCell">{{colon/}} </span>
        </legend>
        <div class="grid-choice-Content grid-Ignore">
        {{for scopeArray}}
            <span class="grid-choice-InputCell">
                <input type="radio" value="{{: name}}" {{if checked}}checked{{/if}} id="{{: ~root.formId}}_scope_{{: name}}" name="scope">
            </span>
            <span class="grid-choice-LabelCell">
                <label for="{{: ~root.formId}}_scope_{{: name}}">{{> ~loc(l10nKey)}}</label>
            </span>
        {{/for}}
        {{if withFieldSelection}}
            <span class="grid-choice-InputCell">
                <input type="radio" value="selection" {{if selectionChecked}}checked{{/if}} id="{{: formId}}_selection" name="scope" data-deploy-role="radio" data-deploy-target="#{{: formId}}_fields">
            </span>
            <span class="grid-choice-LabelCell">
                <label for="{{: formId}}_selection">{{> ~loc('_ label.selection.scope_selection')}}…</label>
            </span>
            <div class="global-DetailPanel grid-choice-DetailCell {{if !selectionChecked}}hidden{{/if}}" id="{{: formId}}_fields">
                <input type="text" value="{{> fields}}" class="selectform-Input" id="{{: formId}}_selection_fields" name="" data-appelant-role="input" data-appelant-type="field">
            </div>
        {{/if}}
        </div>
    </fieldset>
</div>
</form>