<!-- Faraday Penetration Test IDE -->
<!-- Copyright (C) 2013  Infobyte LLC (http://www.infobytesec.com/) -->
<!-- See the file 'doc/LICENSE' for the license information -->
<form name="form" novalidate >
    <div class="modal-header">
        <h3 class="modal-title">Recover password</h3>
    </div>
    <div class="modal-body">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div ng-if="data.recover.valid">
                <div class="alert alert-success target_not_selected" role="alert" ng-hide="">
                    <span class="sr-only">Success!</span>
                    A recovery email has been sent to {{data.email}}.
                </div>
            </div>
            <div ng-if="data.recover.not_found">
                <div class="alert alert-danger target_not_selected" role="alert" ng-hide="">
                    <span class="sr-only">Error!</span>
                    The email {{data.email}} is invalid.
                </div>
            </div>

            <div class="form-input margin-top-10px">
                <label>
                    <input type="email" required id="email" ng-model="data.email" ng-keyup="$event.keyCode == 13 && recover()" ng-class="{'has-error': errorMessage !== undefined }">
                    <span class="placeholder">Please enter your email for recovery instructions</span>
                </label>
            </div>
            <p class="font-xs font-bold fg-red pull-left margin-top-18px">{{errorMessage}}</p>
        </div>
    </div>

    </div><!-- .modal-body -->
    <div class="modal-footer">
        <div class="modal-button">
            <button class="btn btn-success" ng-disabled="form.$invalid" ng-click="recover()">Recover</button>
            <button class="btn btn-danger" ng-click="cancel()">Cancel</button>
        </div>
    </div>
</form>
