<html
    xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
    xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
    data-namespace-typo3-fluid="true"
>

<div class="form-section">

    <h3 class="form-section-headline">
        <f:translate key="LLL:EXT:impexp/Resources/Private/Language/locallang.xlf:importdata_uploadFileFromLocal" />
    </h3>

    <div class="form-group">
        <label class="form-label" for="impexp_upload_1">
            <f:translate key="LLL:EXT:impexp/Resources/Private/Language/locallang.xlf:importdata_browse" />
        </label>
        <input class="form-control" id="impexp_upload_1" type="file" name="upload_1" accept="{allowedUploadExtensionList}" />
    </div>

    <div class="form-group">
        <div class="form-check">
            <input type="hidden" name="overwriteExistingFiles" value="">
            <input
                class="form-check-input"
                id="checkOverwriteExistingFiles"
                type="checkbox"
                name="overwriteExistingFiles"
                value="replace"
                checked="checked"
            >
            <label class="form-check-label" for="checkOverwriteExistingFiles">
                <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:overwriteExistingFiles" />
            </label>
        </div>
    </div>

    <div class="form-group">
        <button
            type="submit"
            class="btn btn-default"
            name="_upload"
            value="1"
        >
            <core:icon identifier="actions-upload" size="small" />
            <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:file_upload.php.submit" />
        </button>
    </div>

    <f:if condition="{uploadStatus}">
        <h4>
            <f:translate key="LLL:EXT:impexp/Resources/Private/Language/locallang.xlf:importdata_uploadStatus" />
        </h4>
        <f:if condition="{uploadStatus} == 1">
            <f:then>
                <f:be.infobox title="{f:translate(key: 'LLL:EXT:impexp/Resources/Private/Language/locallang.xlf:importdata_success')} {uploadedFile}" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::OK')}" />
            </f:then>
            <f:else>
                <f:be.infobox title="{f:translate(key: 'LLL:EXT:impexp/Resources/Private/Language/locallang.xlf:importdata_failureNoFileUploaded')}" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::ERROR')}" />
            </f:else>
        </f:if>
    </f:if>

</div>

</html>
