<li class="tree-Node">
{{if node === "group"}}
<details {{if !hidden}}open{{/if}}>
    <summary class="pane-form-SubsetGroup">{{> title}}</summary>
    <ul class="pane-form-SubsetBranch">
         {{for items tmpl="scrutariexport:form-nodes_corpus"/}}
    </ul>
</details>
{{else node === "subset"}}
<div class="tree-Leaf">
    <p>
        <input type="checkbox" name="{{: subsetKey}}|selected" value="1" data-deploy-role="checkbox" id="{{: generatedId}}_input" data-deploy-target="#{{: generatedId}}_details" {{if checked}}checked{{/if}}>
        <label for="{{: generatedId}}_input">
        {{if title}}{{> title}} <span class="subset-Key">[{{: subsetName}}]</span>{{else}}[{{: subsetName}}]{{/if}}
        </label>
    </p>
    <div class="global-DetailPanel grid-Table {{if !checked}}hidden{{/if}}" id="{{: generatedId}}_details">
        <p class="grid-Row">
            <label for="{{: generatedId}}_hrefpattern" class="grid-LabelCell">
                {{> ~loc('_ label.exportation.hrefpattern')}}
            </label>
            <span class="grid-ColonCell">{{colon /}} </span>
            <span class="grid-InputCell">
                <input id="{{: generatedId}}_hrefpattern" type="text" size="70" name="{{: subsetKey}}|hrefpattern" value="{{: corpusScrutari.hrefPattern}}">
            </span>
        </p>
        <p class="grid-Row">
            <label for="{{: generatedId}}_fieldgenerationsource" class="grid-LabelCell">
                {{> ~loc('_ label.exportation.fieldgenerationsource')}}
            </label>
            <span class="grid-ColonCell">{{colon /}} </span>
            <span class="grid-InputCell">
                <textarea  id="{{: generatedId}}_fieldgenerationsource" cols="45" rows="8" name="{{: subsetKey}}|fieldgenerationsource">{{> corpusScrutari.fieldGenerationSource}}</textarea>
            </span>
        </p>
        <div class="grid-InputCell pane-form-Log hidden" data-role="log" data-subset="{{: subsetKey}}"></div>
        <p class="grid-Row">
            <label for="{{: generatedId}}_datekey" class="grid-LabelCell">
                {{> ~loc('_ label.exportation.datekey')}}
            </label>
            <span class="grid-ColonCell">{{colon /}} </span>
            <span class="grid-InputCell">
                <select name="{{: subsetKey}}|datekey" id="{{: generatedId}}_datekey">
                    <option value="none" {{if withoutDateSource}}selected{{/if}}>---</option>
                {{for dateSourceArray}}
                    <option value="{{: name}}" {{if selected}}selected{{/if}}>[{{: name}}] – {{> title}}</option>
                {{/for}}
                </select>
            </span>
        </p>
        <p class="grid-Row">
            <label for="{{: generatedId}}_includetokens" class="grid-LabelCell">{{> ~loc('_ label.exportation.includetokens')}}</label>
            <span class="grid-ColonCell">{{colon /}} </span>
            <span class="grid-InputCell">
                <input  id="{{: generatedId}}_includetokens" size="70" type="text" name="{{: subsetKey}}|includetokens" value="{{> includeTokens}}">
            </span>
        </p>
        <div class="grid-Row">
            <div class="grid-UniqueCell">
                <span class="command-FlexInput">
                    <input id="{{: generatedId}}_multilangcheck" type="checkbox" name="{{: subsetKey}}|multilang" value="1" data-deploy-role="checkbox" data-deploy-target="#{{: generatedId}}_multilang" {{if isMultilang}}checked{{/if}}>
                    <label for="{{: generatedId}}_multilangcheck">{{> ~loc('_ label.exportation.multilang')}}</label>
                </span>
                <div id="{{: generatedId}}_multilang" class="grid-Table global-DetailPanel {{if multilang.hidden}}hidden{{/if}}">
                    <div class="grid-Row">
                        <div class="grid-UniqueCell">
                            <span class="command-FlexInput">
                                <input id="{{: generatedId}}_multilang_langui" type="radio" name="{{: subsetKey}}|multilangmode" value="langui" {{if multilang.isLangUi}}checked{{/if}}>
                                <label for="{{: generatedId}}_multilang_langui">{{> ~loc('_ label.exportation.multilang_langui')}}</label>
                            </span>
                        </div>
                    </div>
                    <div class="grid-Row">
                        <div class="grid-UniqueCell">
                            <span class="command-FlexInput">
                                <input id="{{: generatedId}}_multilang_thesaurus" type="radio" name="{{: subsetKey}}|multilangmode" value="thesaurus" data-deploy-role="radio" data-deploy-target="#{{: generatedId}}_multilang_thesaurus_details" {{if multilang.isThesaurus}}checked{{/if}} >
                                <label for="{{: generatedId}}_multilang_thesaurus">{{> ~loc('_ label.exportation.multilang_thesaurus')}}</label>
                            </span>
                            <div class="grid-Table global-DetailPanel {{if !multilang.isThesaurus}}hidden{{/if}}" id="{{: generatedId}}_multilang_thesaurus_details">
                                <div class="grid-Row">
                                    <label for="{{: generatedId}}_multilang_thesaurus_select" class="grid-LabelCell">
                                        {{> ~loc('_ label.global.thesaurus')}}
                                    </label>
                                    <span class="grid-ColonCell">{{colon /}} </span>
                                    <span class="grid-InputCell">
                                        <select name="{{: subsetKey}}|multilangthesaurus" id="{{: generatedId}}_multilang_thesaurus_select">
                                            {{for multilang.thesaurusOptions}}
                                                <option value="{{: name}}" {{if selected}}selected{{/if}}>{{> title}} [{{:name}}]</option>
                                            {{/for}}                      
                                        </select>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="grid-Row">
                        <div class="grid-UniqueCell">
                            <span class="command-FlexInput">
                                <input id="{{: generatedId}}_multilang_field" type="radio" name="{{: subsetKey}}|multilangmode" value="field" data-deploy-role="radio" data-deploy-target="#{{: generatedId}}_multilang_field_details" {{if multilang.isField}}checked{{/if}}>
                                <label for="{{: generatedId}}_multilang_field">{{> ~loc('_ label.exportation.multilang_field')}}</label>
                            </span>
                            <div class="grid-Table global-DetailPanel {{if !multilang.isField}}hidden{{/if}}" id="{{: generatedId}}_multilang_field_details">
                                <div class="grid-Row">
                                    <label for="{{: generatedId}}_multilang_field_select" class="grid-LabelCell">
                                        {{> ~loc('_ label.exportation.langfield')}}
                                    </label>
                                    <span class="grid-ColonCell">{{colon /}} </span>
                                    <span class="grid-InputCell">
                                        <select name="{{: subsetKey}}|multilangfield" id="{{: generatedId}}_multilang_field_select">
                                        {{for multilang.fieldOptions}}
                                            <option value="{{: name}}" {{if selected}}selected{{/if}}>[{{:name}}] – {{> title}}</option>
                                        {{/for}}
                                        </select>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="grid-Row">
                        <div class="grid-UniqueCell">
                            <span class="command-FlexInput">
                                <input id="{{: generatedId}}_multilang_custom" type="radio" name="{{: subsetKey}}|multilangmode" value="custom" data-deploy-role="radio" data-deploy-target="#{{: generatedId}}_multilang_custom_details" {{if multilang.isCustom}}checked{{/if}}>
                                <label for="{{: generatedId}}_multilang_custom">{{> ~loc('_ label.exportation.multilang_custom')}}</label>
                                
                            </span>
                        </div>
                        <div class="grid-Table global-DetailPanel {{if !multilang.isCustom}}hidden{{/if}}" id="{{: generatedId}}_multilang_custom_details">
                            <div class="grid-Row">
                                <label for="{{: generatedId}}_multilang_custom_input" class="grid-LabelCell">
                                    {{> ~loc('_ label.exportation.langcustom')}}
                                </label>
                                <span class="grid-ColonCell">{{colon /}} </span>
                                <span class="grid-InputCell">
                                    <input type="text" id="{{: generatedId}}_multilang_custom_input" size="20" name="{{: subsetKey}}|multilangcustom" value="{{> multilang.customValue}}">
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{{/if}}
</li>