@model PantheonRA.WebApi.Contracts.ForgotPasswordResponse
@{
    Layout = "~/Views/Shared/_LoginLayout.cshtml";
}

    <div class="login-splash">
        @*TODO: localize link*@
        <a href="https://www.datalab.si/" target="_blank" class="login-splash-logo"></a>
    </div>
    <div class="login animated fadeInDown">
        <div class="login-logo"></div>

        <div class="login-title">@Html.Raw(string.Format(Loc.ForgotPassword, "<br/>"))</div>

        <div class="login-form text-center loginscreen">

            @if (Model != null)
            {
                if (Model.InvalidUsername || Model.Success)
                {
                    <p>@Html.Raw(Model.Message)</p>
                }
            }
            @if (!Model.EmailSent)
            {
        <div>
            @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "m-t", @id = "login-form" }))
            {
                <p class="text-left">@Loc.IfPasswordLost</p>
                <p class="text-left">@Loc.ToResetPassword</p>

                <div class="form-group">
                    <label>@Loc.User</label>
                    @Html.TextBoxFor(model => model.Username, new { @class = "form-control", @required = "required" })
                    @Html.ValidationMessageFor(model => model.Username)
                </div>

                <div class="form-group">
                    <label>@Loc.Company</label>
                    @Html.TextBoxFor(model => model.Domain, new { @class = "form-control", @required = "required" })
                    @Html.ValidationMessageFor(model => model.Domain)
                </div>

                <div class="form-group">
                    <label>@Loc.Email</label>
                    @Html.TextBoxFor(model => model.Email, new { @class = "form-control", @required = "required" })
                    @Html.ValidationMessageFor(model => model.Email)
                </div>

                @Html.ValidationMessage("")

                <div class="form-group">
                    <button type="submit" class="btn btn-success block m-b form-submit pull-left">
                        <i class="fa fa-lock hidden m-r-sm"></i><span>@Loc.ResetPassword</span>
                    </button>

                    <a href="#" class="pull-right text-success" onclick="redirectToLogin();"><span class="fa fa-arrow-left"></span> @Loc.Login</a>
                </div>
            }
        </div>
            }
        </div>

        <div class="row">
            <div class="col-md-12">
                <p class="text-left m-t-xs login-copyright">Copyright Datalab &copy; 1997 - @(DateTime.Now.Year.ToString())</p>
            </div>
        </div>
    </div>

    <script>
        function redirectToLogin() {
            window.location.href = '@Url.Action("Login", "Account")';
        }
    </script>