@model Qusion.WebApp.Areas.Qusion.Models.Account.ResetPasswordModel
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
    <head>
        <meta name="viewport" content="width=device-width" />
        <title>Qusion 5 - Reset password</title>
        <link href="~/Areas/Qusion/Style/account.css" rel="stylesheet" />
    </head>
    <body>
        <div>
            <div class="login">
                <div class="login-screen">
                    <div class="login-form form">
                        <h2>Reset password</h2>
                        @if (!ViewBag.Reset)
                        {
                            using (Html.BeginForm(null, null, FormMethod.Post, new { autocomplete = "off" }))
                            {
                                @Html.AntiForgeryToken()
                                @Html.ValidationSummary(true)
                                <div class="control-group">
                                    <p> Type reset token you received via email and new password.</p>
                                </div>
                                <div class="control-group">
                                    @Html.LabelFor(x => x.Token, "Reset token", new {@class = "control-label"})
                                    <div class="controls">
                                        @Html.TextBoxFor(x => x.Token, new {type = "text", @class = "input-block", placeholder = "Your token"})
                                    </div>
                                </div>
                                <div class="control-group">
                                    @Html.LabelFor(x => x.Password, "New password", new {@class = "control-label"})
                                    <div class="controls">
                                        @Html.PasswordFor(x => x.Password, new {@class = "input-block", placeholder = "Your new password"})
                                    </div>
                                </div>
                                <div class="control-group">
                                    <div class="controls">
                                        <button type="submit" class="button green button-block">Reset password</button>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <div class="controls">
                                        @Html.ActionLink("Back to login", "Login") 
                                    </div>
                                </div>
                            }
                        }
                        else
                        {
                            <div class="alert alert-success">
                                Your password has been reset. 
                                @Html.ActionLink("Back to login page", "Login") and use your new password to sign in.
                            </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>