<details class="unit-Unit pane-form-Unit" {{if (queryXml.length > 0) || (currentSelectionDefName)}}open{{/if}}>
    <summary class="pane-form-Summary action-Selection"><span class="global-button-Icon"></span><span class="pane-form-SummaryTitle">{{> ~loc('_ title.exportation.fichequery')}}</span></summary>
    <div class="unit-Body">
        <div class="grid-Table">
    {{if selectionDefArray && selectionDefArray.length > 0}}
        <p class="grid-Row">
            <label for="{{: formId}}_selectiondefname" class="grid-LabelCell">
                {{> ~loc('_ label.global.selectiondef')}}
            </label>
             <span class="grid-ColonCell">{{colon /}} </span>
             <span class="grid-InputCell">
                <select name="selectiondefname" id="{{: formId}}_selectiondefname">
                    <option value=""{{if !currentSelectionDefName}} selected{{/if}}>
                        ---
                    </option>
            {{for selectionDefArray}}
                    <option value="{{: name}}"{{if name===~root.currentSelectionDefName}} selected{{/if}}>
                        [{{: name}}]{{if title}} {{> title}}{{/if}}
                    </option>
            {{/for}}
                </select>
            </span>
        </p>
    {{/if}}
        <p class="grid-Row">
            <label for="{{: formId}}_queryxml" class="grid-LabelCell">
                {{> ~loc('_ label.exportation.queryxml')}}
            </label>
             <span class="grid-ColonCell">{{colon /}} </span>
            <span class="grid-InputCell">
                <textarea type="text" cols="70" rows="8" name="query_xml" id="{{: formId}}_queryxml">{{> queryXml}}</textarea>
                <br>
                <button id="{{: formId}}_button_queryparser" class="global-button-Standard action-FqlEditor" type="button">
                    <span class="global-button-Icon"></span>
                    <span class="global-button-Text">{{> ~loc('_ link.selection.fqleditor')}}</span>
                </button>
            </span>
        </p>
        </div>
    </div>
</details>
