<form action="{{: action}}" method="POST" id="{{: formId}}" class="pane-form-Container" data-stock-role="handler" data-role="content-reference" data-content-key="{{: accessName}}" data-timer-type="form">
<input type="hidden" name="cmd" value="AccessChange">
<input type="hidden" name="json" value="access">
<input type="hidden" name="access" value="{{: accessName}}">
<div class="pane-form-Head pane-HiddenInStock">
    <h1 class="pane-form-Title" data-stock-role="title"><span class="pane-form-Key">[{{: accessName}}]</span> <span data-role="metadata-title">{{> title}}</span></h1>
    <div class="pane-form-Toolbar">
        <button id="{{: formId}}_button_save" type="submit" class="global-button-Standard action-Save" disabled="disabled" data-state-enable="change-current" data-role="savebutton" data-shortcut-tooltip="MOD+S">
            <span class="global-button-Icon"></span>
            <span class="global-button-Text">{{> ~loc('_ submit.exportation.accesschange')}}</span>
        </button>
        <span class="global-Glue"></span>
        <button id="{{: formId}}_button_stock" type="button" class="global-button-Standard action-stock-Add" title="{{> ~loc('_ link.stock.add_current')}}" data-state-enable="!change-current">
            <span class="global-button-Icon"></span>
        </button>
    </div>
</div>
<div class="pane-form-MetadataBody">
    
    {{include tmpl="pane:details_labels"/}}
    
    <details class="unit-Unit pane-form-Unit" open>
        <summary class="pane-form-Summary action-Admin"><span class="global-button-Icon"></span><span class="pane-form-SummaryTitle">{{> ~loc('_ title.exportation.generaloptions')}}</span></summary>
        <div class="unit-Body">
            <div class="grid-Table">
                <p class="grid-Row">
                    <label for="{{: formId}}_tableexportname" class="grid-LabelCell">
                        {{> ~loc('_ label.global.tableexport')}}
                    </label>
                    <span class="grid-ColonCell">{{colon /}} </span>
                    <span class="grid-InputCell">
                        <select name="tableexportname" id="{{: formId}}_tableexportname">
                            <option value=""{{if !currentTableExportName}} selected{{/if}}>
                                       ---
                            </option>
                    {{for tableExportArray}}
                            <option value="{{: name}}"{{if name===~root.currentTableExportName}} selected{{/if}}>
                                [{{: name}}]{{if title}} {{> title}}{{/if}}
                            </option>
                    {{/for}}
                        </select>
                    </span>
                </p>
                <fieldset class="grid-Row grid-choice-Fieldset">
                    <legend class="grid-choice-Legend grid-Ignore">
                        <span class="grid-LabelCell">{{> ~loc('_ title.exportation.accesstype')}}</span>
                        <span class="grid-ColonCell">{{colon /}} </span>
                    </legend>
                    <div class="grid-choice-Content grid-Ignore">
                        <span class="grid-choice-InputCell">
                            <input id="{{: formId}}_public" type="radio" value="public" name="type"{{if currentType === "public"}} checked{{/if}}>
                        </span>
                        <span class="grid-choice-LabelCell">
                            <label for="{{: formId}}_public">{{> ~loc('_ label.exportation.accesstype_public')}}</label>
                        </span>
                        <span class="grid-choice-InputCell">
                            <input id="{{: formId}}_token" type="radio" value="token" name="type" data-deploy-role="radio" data-deploy-target="#{{: formId}}_token_details"{{if currentType === "token"}} checked{{/if}}>
                        </span>
                        <span class="grid-choice-LabelCell">
                            <label for="{{: formId}}_token">{{> ~loc('_ label.exportation.accesstype_token')}}</label>
                        </span>
                        <div class="global-DetailPanel grid-choice-DetailCell {{if currentType !== "token"}}hidden{{/if}}" id="{{: formId}}_token_details">
                            <div class="grid-Table">
                                <p class="grid-Row">
                                    <label for="{{: formId}}_token_input" class="grid-LabelCell">
                                        {{> ~loc('_ label.exportation.token')}}
                                    </label>
                                    <span class="grid-ColonCell">{{colon /}} </span>
                                    <span class="grid-InputCell">
                                         <input id="{{: formId}}_token_input" type="text" name="token" size="40" value="{{> currentToken}}">
                                    </span>
                                </p>
                            </div>
                        </div>
                        <span class="grid-choice-InputCell">
                            <input id="{{: formId}}_private" type="radio" value="private" name="type"{{if currentType === "private"}} checked{{/if}}>
                        </span>
                        <span class="grid-choice-LabelCell">
                            <label for="{{: formId}}_private">{{> ~loc('_ label.exportation.accesstype_private')}}</label>
                        </span>
                    </div>
                </fieldset>
            </div>
        </div>
    </details>
     
    {{include tmpl="pane:details_query"/}}  
    
    {{include tmpl="pane:details_attributes"/}}

    {{include tmpl="pane:commandkey_form"/}}
</div>
</form>
