@model PantheonApi.SyncApi.Models.ChangePasswordViewModel

@{
    ViewBag.Title = "ChangePassword";
}

<h2>Change Password</h2>

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        @if (TempData["ChangePassword"] != null)
                {
            <div class="alert alert-danger no-border">
                <button type="button" class="close" data-dismiss="alert"><span>×</span><span class="sr-only">Close</span></button>
                <span class="text-semibold">@TempData["ChangePassword"]</span>
            </div>
        }
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
       <div class="row">
           <div class="col-md-8">
               <div class="form-group">
                   @Html.LabelFor(model => model.OldPassword, htmlAttributes: new { @class = "control-label col-md-3" })
                   <div class="col-md-9">
                       @Html.EditorFor(model => model.OldPassword, new { htmlAttributes = new { @class = "form-control" } })
                       @Html.ValidationMessageFor(model => model.OldPassword, "", new { @class = "text-danger" })
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.NewPassword, htmlAttributes: new { @class = "control-label col-md-3" })
                   <div class="col-md-9">
                       @Html.EditorFor(model => model.NewPassword, new { htmlAttributes = new { @class = "form-control" } })
                       @Html.ValidationMessageFor(model => model.NewPassword, "", new { @class = "text-danger" })
                   </div>
               </div>

               <div class="form-group">
                   @Html.LabelFor(model => model.ConfirmPassword, htmlAttributes: new { @class = "control-label col-md-3" })
                   <div class="col-md-9">
                       @Html.EditorFor(model => model.ConfirmPassword, new { htmlAttributes = new { @class = "form-control" } })
                       @Html.ValidationMessageFor(model => model.ConfirmPassword, "", new { @class = "text-danger" })
                   </div>
               </div>
           </div>
       </div>

        <div class="form-group">
            <div class="text-right">
                <a class="btn btn-default" href="~/Home/Index">Cancel</a>
                <input type="submit" value="Save" class="btn btn-success" />
            </div>
        </div>
    </div>
}
