@using e_suite.API.Common.models @model e_suite.API.Common.models.Login @{ ViewBag.Title = "e-suite"; Layout = "~/Views/Shared/_layout.cshtml"; }

Login

@using (Html.BeginForm(method: FormMethod.Post, antiforgery:true, htmlAttributes: new { data_full_page_redirect = "true" })) {
@Html.AntiForgeryToken() @switch (ViewBag.loginResponse) { case LoginResult.EmailNotConfirmed:
Password reset e-mail has been sent.
Back to login break; case LoginResult.TwoFactorAuthenticationRemovalRequested:
Two factor authentication removal has been requested
Back to login break; case LoginResult.TwoFactorAuthenticationCodeRequired: case LoginResult.TwoFactorAuthenticationCodeIncorrect: @Html.HiddenFor(m => m.Email) @Html.HiddenFor(m => m.Password)
@Html.LabelFor(m => m.SecurityCode)
@Html.EditorFor(m => m.SecurityCode, new { htmlAttributes = new { autocomplete = "one-time-code" } }) @Html.ValidationMessageFor(m => m.Email)
break; case LoginResult.Failed: default:
@Html.LabelFor(m => m.Email)
@Html.EditorFor(m => m.Email, new { htmlAttributes = new { type = "email", autocomplete = "username", @class = "form-control" } }) @Html.ValidationMessageFor(m => m.Email)
@if (Model.ForgotPassword) {
Password reset e-mail has been sent.
Back to login } else { @if (string.IsNullOrWhiteSpace(Model.Email)) { } else {
@Html.LabelFor(m => m.Password)
@Html.EditorFor(m => m.Password, new { htmlAttributes = new { type = "password", autocomplete = "current-password" } }) @Html.ValidationMessageFor(m => m.Password)
} } break; }
}