@using Orchard.ContentManagement

@{
    var userCanRegister = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
    var enableLostPassword = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().EnableLostPassword;
}

<header class="static-page-header">
    <h1 class="static-page-title">@Html.TitleForPage((string)Model.Title)</h1>
    <p class="static-page-subtitle">@T("Please enter your username and password.")</p>
</header>

<p class="account-actions">
    @if(userCanRegister) 
    { 
        @Html.ActionLink(T("Register").Text, "Register", new { ReturnUrl = Request.QueryString["ReturnUrl"] }) @T(" if you don't have an account.") 
    }
    
    @if(enableLostPassword) 
    { 
        <text> </text>@Html.ActionLink(T("Lost your Password?").Text, "RequestLostPassword") 
    }
</p>

@Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString())

@using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new { ReturnUrl = Request.QueryString["ReturnUrl"] }))) {
    <div class="form-group">
        @Html.TextBox("userNameOrEmail", "", new { id = "username-email", autofocus = "autofocus", placeholder = @T("Username or Email") })
        @Html.ValidationMessage("userNameOrEmail")
    </div>
    
    <div class="form-group">        
        @Html.Password("password", "", new { placeholder = @T("Password") })
        @Html.ValidationMessage("password")
    </div>
    
    <div class="form-group">
        @Html.CheckBox("rememberMe", new { id = "remember-me" })
        <label class="forcheckbox" for="remember-me">@T("Remember Me")</label>
    </div>
    
    <button type="submit" class="btn btn-primary">@T("Log On")</button>
}