<div ng-controller="ImportController" class="importpage">

    <h1 ng-hide="restoremode" translate>Import backup configuration</h1>
    <h1 ng-show="restoremode" translate>Restore from backup configuration</h1>

    <form id="import-form" class="styled" ng-submit="false">

        <div class="input text">
            <label for="file" translate>Configuration file:</label>
            <input type="file" name="config" id="config" />
        </div>

        <div class="input text">
            <label for="passphrase" translate>Passphrase (if encrypted)</label>
            <input type="password" name="passphrase" id="passphrase" placeholder="Enter encryption passphrase" ng-model="form.passphrase" />
        </div>

        <div class="input checkbox" ng-hide="restoremode">
            <label for="import_metadata" translate>Import metadata</label>
            <input type="checkbox" name="import_metadata" id="import_metadata" value="true" ng-model="form.import_metadata" />
        </div>

        <div class="input checkbox" ng-hide="restoremode">
            <label for="direct" translate>Save immediately</label>
            <input type="checkbox" name="direct" id="direct" value="true" ng-model="form.direct" />
        </div>

        <div class="buttons" ng-hide="Connecting">
            <a href ng-click="doSubmit()" translate>Import</a>
        </div>

        <div class="buttons" ng-show="Connecting">
            <a href translate>Importing …</a>
        </div>
    </form>
</div>
