@model LoginModel
@using Nop.Core
@using Nop.Core.Domain.Customers
@inject IWebHelper webHelper
@{
    Layout = "_ColumnsOne";

    //title
    NopHtml.AddTitleParts(T("PageTitle.Login").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-login-page");

    //register URL with return URL (if specified)
    var registerUrl = Url.RouteUrl("Register", new { returnUrl = this.Context.Request.Query["returnUrl"] }, webHelper.GetCurrentRequestProtocol());
}
<div class="page login-page">
    <div class="page-title panel-heading">
        <h1>@T("Account.Login.Welcome")</h1>
    </div>
    @await Html.PartialAsync("_ExternalAuthentication.Errors")
    <div class="page-body">
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LoginTop, additionalData = Model })
        <div class="customer-blocks">
            <div class="row">
                @if (Model.RegistrationType == UserRegistrationType.Disabled)
                {				
                    <div class="col-sm-6 col-md-6">
						<div class="new-wrapper">
							<div class="title">
								@T("Account.Register")
							</div>
							<div class="text">
								@T("Account.Register.Result.Disabled")
							</div>
						</div>
					</div>
                }
                else if (Model.CheckoutAsGuest)
                {
                    <div class="col-sm-6 col-md-6">
                        <div class="new-wrapper checkout-as-guest-or-register-block">
                            <fieldset>
                                <legend>@T("Account.Login.CheckoutAsGuestOrRegister")</legend>

                                <div class="text">
                                    @await Component.InvokeAsync(typeof(TopicBlockViewComponent), new { systemName = "CheckoutAsGuestOrRegister" })
                                    <div class="buttons col-sm-offset-1 col-md-offset-1 col-md-10">
                                        <button type="button" class="btn btn-primary checkout-as-guest-button" onclick="location.href='@Url.RouteUrl("Checkout")'">@T("Account.Login.CheckoutAsGuest")</button>
                                        <button type="button" class="btn btn-primary register-button" onclick="location.href='@registerUrl'">@T("Account.Register")</button>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                }
                else
                {
                    <div class="col-sm-6 col-md-6">
                        <div class="new-wrapper register-block">
                            <fieldset>
                                <legend>@T("Account.Login.NewCustomer")</legend>
                                <div class="text">
                                    @T("Account.Login.NewCustomerText")
                                    <div class="form-group">
                                        <label class="control-label"></label>
                                        <div class="controls">
                                            <button type="button" class="btn btn-primary register-button" onclick="location.href='@registerUrl'">@T("Account.Register")</button>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                }
                <div class="col-sm-6 col-md-6">
                    <div class="returning-wrapper">
                        <fieldset>
                            <legend>@T("Account.Login.ReturningCustomer")</legend>
                            <div class="form-fields form-horizontal">
                                <form asp-route="Login" asp-route-returnurl="@Context.Request.Query["ReturnUrl"]" method="post" autocomplete="off">
                                    <div asp-validation-summary="ModelOnly" class="message-error alert alert-danger">@T("Account.Login.Unsuccessful")</div>
                                    @if (Model.UsernamesEnabled)
                                    {
                                        <div class="form-group">
                                            <label class="col-xs-12 col-sm-12 col-md-12 control-label" asp-for="Username" asp-postfix=":"></label>
                                            <div class="col-md-12">
                                                <input asp-for="Username" class="username form-control" autofocus="autofocus" />
                                                <span asp-validation-for="Username"></span>
                                            </div>
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="form-group">
                                            <label class="col-xs-12 col-sm-12 col-md-12 control-label" asp-for="Email" asp-postfix=":"></label>
                                            <div class="col-md-12">
                                                <input asp-for="Email" class="email form-control" autofocus="autofocus" />
                                                <span asp-validation-for="Email"></span>
                                            </div>
                                        </div>
                                    }
                                    <div class="form-group">
                                        <label class="col-xs-12 col-sm-12 col-md-12 control-label" asp-for="Password" asp-postfix=":"></label>
                                        <div class="col-md-12">
                                            <input asp-for="Password" class="password form-control" />
                                            <span asp-validation-for="Password"></span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="remember-me">
                                            <div class="checkbox">
                                                <input class="checkbox" asp-for="RememberMe" />
                                                <label class="remember-text" asp-for="RememberMe"></label>
                                                <span class="forgot-password">
                                                    <a asp-route="PasswordRecovery">@T("Account.Login.ForgotPassword")</a>
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                    @if (Model.DisplayCaptcha)
                                    {
                                        <div class="form-group">
                                            <div class="captcha-box col-md-6">
                                                <nop-captcha />
                                            </div>
                                        </div>
                                    }
                                    <div class="form-group">
                                        <div class="col-md-3">
                                            <button class="btn btn-primary login-button" type="submit">@T("Account.Login.LoginButton")</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="external-authentication col-sm-12 col-md-12">
                    @await Component.InvokeAsync(typeof(ExternalMethodsViewComponent), "ExternalAuthentication")
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-sm-12 col-md-12">
        @await Component.InvokeAsync(typeof(TopicBlockViewComponent), new { systemName = "LoginRegistrationInfo" })
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LoginBottom, additionalData = Model })
    </div>
</div>