<div class="restore restore-direct" ng-controller="RestoreDirectController">
    <form id="restore" class="styled">
        <div ng-show="!connecting">
            <div class="steps">
                <div class="step step1" ng-class="{active: CurrentStep == 0}" ng-click="CurrentStep = 0">
                    <span>1</span>
                </div>
                <div class="step step2" ng-class="{active: CurrentStep == 1}"  ng-click="CurrentStep = 1">
                    <span>2</span>
                </div>
                <div class="step step3 not-clickable">
                    <span>3</span>
                </div>
                <div class="step step4 not-clickable">
                    <span>4</span>
                </div>
            </div>
            <!-- .steps -->

            <ol class="steps-legend">
                <li ng-class="{active: CurrentStep == 0}" class="step1" ng-click="CurrentStep = 0" translate>Backup location</li>
                <li ng-class="{active: CurrentStep == 1}" class="step2" ng-click="CurrentStep = 1" translate>Encryption</li>
                <li class="step3 not-clickable" translate>Select files</li>
                <li class="step4 not-clickable" translate>Restore options</li>
            </ol>
            <!-- .steps-legend -->

            <div class="steps-boxes">
                <div class="step step1" ng-class="{active: CurrentStep == 0}">
                    <div class="headerthreedotmenu">
                        <h2 translate>Backup location</h2>

                        <div class="contextmenu_container">
                            <a href title="{{'Menu' | translate}}"><img src="img/three_dots.png" srcset="img/three_dots.png 1x, img/three_dots_2x.png 2x, img/three_dots_3x.png 3x" id="threedotmenubutton_add_destination" class="threedotmenubutton"/></a>

                            <div class="contextmenu" id="threedotmenu_add_destination">
                                <ul>
                                    <li>
                                        <a href ng-click="importUrl()" translate>Import Destination URL</a>
                                    </li>
                                    <li>
                                        <a href ng-click="copyUrlToClipboard()" translate>Copy Destination URL to Clipboard</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>

                    <backup-edit-uri uri="TargetURL" set-builduri-fn="setBuilduriFn(builduriFn)"></backup-edit-uri>

                    <div class="buttons">
                        <input class="submit next" type="button" id="nextStep1" ng-click="nextPage()" value="{{'Next' | translate}} &gt;" />
                    </div>
                </div>
                <!-- .step1 -->

                <div class="step step2" ng-class="{active: CurrentStep == 1}">
                    <h2 translate>Encryption</h2>
                    <div class="input password">
                        <label for="password" translate>Passphrase</label>
                        <input type="password" id="password" name="password" ng-model="EncryptionPassphrase" placeholder="{{'Enter backup passphrase, if any' | translate}}" />
                    </div>

                    <div class="expandable">
                        <a href ng-click="showAdvanced = !showAdvanced">
                            <h2 translate>Advanced Options</h2>
                            <img ng-show="showAdvanced" src="img/arrow_collapse_green.png" srcset="img/arrow_collapse_green.png 1x, img/arrow_collapse_green_2x.png 2x, img/arrow_collapse_green_3x.png 3x">
                            <img ng-hide="showAdvanced" src="img/arrow_expand_green.png" srcset="img/arrow_expand_green.png 1x, img/arrow_expand_green_2x.png 2x, img/arrow_expand_green_3x.png 3x">
                        </a>
                    </div>

                    <div ng-show="showAdvanced">
                        <div class="input textarea">
                            <label for="options">{{'Advanced Options' | translate}}</label>
                            <textarea id="options" name="options" ng-model="ExtendedOptions" placeholder="{{AppUtils.format(AppUtils.exampleOptionString, '--prefix')}}"></textarea>
                        </div>
                    </div>

                    <div class="buttons" ng-hide="connecting">
                        <input class="submit" type="button" id="connect" ng-click="doConnect()" value="{{'Connect' | translate}}" />
                        <input class="submit prev" type="button" id="prevStep2" ng-click="prevPage()" value="&lt; {{'Previous' | translate}}" />
                    </div>
                    <div ng-show="connecting">
                        {{ConnectionProgress}}
                    </div>
                </div>
                <!-- .step2 -->
            </div>
            <!-- .steps-boxes -->
        </div>

        <div ng-show="connecting == true &amp;&amp; taskid == null">
            {{ConnectionProgress}}
            <div ng-show="serverstate.programState == 'Paused'">
                {{'Server is currently paused,' | translate}} <a style="cursor: pointer" ng-click="ServerStatus.resume()" translate>resume now</a>
            </div>
        </div>
    </form>
</div>
