<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<h3>
	<f:translate key="makeconfig_exportPagetreeConfiguration" />
	<f:be.buttons.csh table="xMOD_tx_impexp" field="pageTreeCfg" />
</h3>
<div class="row">
	<div class="col-sm-2">
		<label class="control-label"><f:translate key="makeconfig_pageId" /></label>
	</div>
	<div class="col-sm-10">
		{inData.pagetree.id}
		<f:form.hidden value="{inData.pagetree.id}" name="tx_impexp[pagetree][id]" />
	</div>
</div>
<div class="row">
	<div class="col-sm-2">
		<label class="control-label">
			<f:translate key="makeconfig_tree" />
			<f:be.buttons.csh table="xMOD_tx_impexp" field="pageTreeDisplay" />
		</label>
	</div>
	<div class="col-sm-10">
		<f:if condition="{treeHTML}">
			<f:then><f:format.raw>{treeHTML}</f:format.raw></f:then>
			<f:else><f:translate key="makeconfig_noTreeExportedOnly" /></f:else>
		</f:if>
	</div>
</div>
<div class="form-group">
	<label for="impexp-pagetree-levels">
		<f:translate key="makeconfig_levels" />
	</label>
	<f:be.buttons.csh table="xMOD_tx_impexp" field="pageTreeMode" />
	<f:form.select class="form-control" name="tx_impexp[pagetree][levels]" id="impexp-pagetree-levels" options="{levelSelectOptions}" value="{inData.pagetree.levels}" />
</div>
<div class="form-group">
	<label for="impexp-pagetree-includetables">
		<f:translate key="makeconfig_includeTables" />
	</label>
	<f:be.buttons.csh table="xMOD_tx_impexp" field="pageTreeRecordLimit"/>
	<f:form.select class="form-control" name="tx_impexp[pagetree][tables]" id="impexp-pagetree-includetables"
								 options="{tableSelectOptions}" multiple="multiple" value="{inData.pagetree.tables}"
								 size="{f:if(condition: '{tableSelectOptions -> f:count()} > 9', then: '10', else: '5')}" />
</div>
<div class="form-group">
	<label for="impexp-pagetree-maxnumber">
		<f:translate key="makeconfig_maxNumberOfRecords" />
	</label>
	<f:form.textfield class="form-control" name="tx_impexp[pagetree][maxNumber]" id="impexp-pagetree-maxnumber" value="{inData.pagetree.maxNumber}" />
</div>
<f:if condition="{records -> f:count()} > 0">
	<h4>
		<f:translate key="makeconfig_exportSingleRecord" />
		<f:be.buttons.csh table="xMOD_tx_impexp" field="singleRecord" />
	</h4>
	<div class="row">
		<div class="col-sm-2">
			<label><f:translate key="makeconfig_record" /></label>
		</div>
		<div class="col-sm-10">
			<f:for each="{records}" as="record">
				<f:format.raw>{record.icon}</f:format.raw>
				{record.title}
				<f:form.hidden name="tx_impexp[record][]" value="{record.tableName}:{record.recordUid}" />
				<br />
			</f:for>
		</div>
	</div>
</f:if>
<f:if condition="{tableList -> f:count()} > 0">
	<h4><f:translate key="makeconfig_exportTablesFromPages" /></h4>
	<div class="row">
		<div class="col-sm-2">
			<label>
				<f:translate key="makeconfig_tablePids" />
				<f:be.buttons.csh table="xMOD_tx_impexp" field="tableList" />
			</label>
		</div>
		<div class="col-sm-10">
			<f:for each="{tableList}" as="table">
				<f:format.raw>{table.iconAndTitle}</f:format.raw>
				<f:form.hidden name="tx_impexp[list][]" value="{table.reference}" />
				<br />
			</f:for>
		</div>
	</div>
	<div class="form-group">
		<label for="impexp-listcfg-maxnumber">
			<f:translate key="makeconfig_maxNumberOfRecords" />
			<f:be.buttons.csh table="xMOD_tx_impexp" field="tableListMaxNumber" />
		</label>
		<f:form.textfield class="form-control" name="tx_impexp[listCfg][maxNumber]" id="impexp-listcfg-maxnumber"value="{inData.listCfg.maxNumber}" />
	</div>
</f:if>
<h4><f:translate key="makeconfig_relationsAndExclusions" /></h4>
<div class="form-group">
	<label for="impexp-externalref-tables">
		<f:translate key="makeconfig_includeRelationsToTables" />
	</label>
	<f:be.buttons.csh table="xMOD_tx_impexp" field="inclRelations" />
	<f:form.select class="form-control" name="tx_impexp[external_ref][tables]" id="impexp-externalref-tables"
								 options="{externalReferenceTableSelectOptions}" multiple="multiple" value="{inData.external_ref.tables}"
								 size="{f:if(condition: '{externalReferenceTableSelectOptions -> f:count()} > 9', then: '10', else: '5')}" />
</div>
<div class="form-group">
	<label for="impexp-externalstatic-tables">
		<f:translate key="makeconfig_useStaticRelationsFor" />
	</label>
	<f:be.buttons.csh table="xMOD_tx_impexp" field="staticRelations" />
	<f:form.select class="form-control" name="tx_impexp[external_static][tables]" id="impexp-externalstatic-tables"
								 options="{externalStaticTableSelectOptions}" multiple="multiple" value="{inData.external_static.tables}"
								 size="{f:if(condition: '{externalStaticTableSelectOptions -> f:count()} > 9', then: '10', else: '5')}" />
</div>
<div class="form-group">
	<label for="checkShowStaticRelations">
		<f:form.checkbox name="tx_impexp[showStaticRelations]" id="checkShowStaticRelations" value="1"
										 checked="{inData.showStaticRelations} == 1" />
		<f:translate key="makeconfig_showStaticRelations" />
	</label>
</div>

<div class="form-group">
	<label class="control-label">
		<f:translate key="makeconfig_excludeElements" />
		<f:be.buttons.csh table="xMOD_tx_impexp" field="excludedElements" />
	</label>
	<p class="form-control-static">
		<f:if condition="{inData.exclude -> f:count()} > 0">
			<f:then>
				<f:for each="{inData.exclude}" key="key" as="value" iteration="index">
					<f:form.hidden name="tx_impexp[exclude][{key}]" value="1" />
					<f:if condition="{index.isLast}">
						<f:then>{key}</f:then>
						<f:else>{key}, </f:else>
					</f:if>
				</f:for>
				<label for="checkExclude">
					<input type="checkbox" name="tx_impexp[exclude]" id="checkExclude" value="1" />
					<f:translate key="makeconfig_clearAllExclusions" />
				</label>
			</f:then>
			<f:else>
					<f:translate key="makeconfig_noManuallyExcludedElementsYet" />
			</f:else>
		</f:if>
	</p>
	<p class="form-control-static">
		<label for="checkExcludeDisabled">
			<f:form.checkbox name="tx_impexp[excludeDisabled]" id="checkExcludeDisabled" value="1" checked="{inData.excludeDisabled}" />
			<f:translate key="makeconfig_excludeDisabledElements" />
		</label>
	</p>
</div>

<div class="form-group">
	<f:form.submit class="btn btn-default" value="{f:translate(key: 'makeadvanc_update')}" />
	<f:form.hidden
				 name="tx_impexp[download_export_name]"
				 value="{nameSuggestion -> f:format.crop(maxCharacters: 30, append: '')}" />
</div>
</html>
