<commit_before>﻿@using Orchard.ContentManagement

@{
    var userCanRegister = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
    var enableLostPassword = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().EnableLostPassword;
}
<div class="well logreg">
    <h3>Sign In to @WorkContext.CurrentSite.SiteName</h3>
    <hr />
    @using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { @class = "form-horizontal" })) {
        <!-- Username -->
        <div class="control-group">
            <label class="control-label" for="userNameOrEmail">@T("Username")</label>
            <div class="controls">
                @Html.TextBox("userNameOrEmail", "", new { id = "username-email", @class = "input-large", autofocus = "autofocus" })
                @Html.ValidationMessage("userNameOrEmail")
            </div>
        </div>
        <!-- Password -->
        <div class="control-group">
            <label class="control-label" for="password">@T("Password")</label>
            <div class="controls">
                @Html.Password("password", string.Empty, new { @class = "input-large" })
                @Html.ValidationMessage("password")
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <label class="checkbox">
                    @Html.CheckBox("rememberMe", new { id = "remember-me" })
                    @T("Remember me")
                </label>
            </div>
        </div>
        <!-- Buttons -->
        <div class="form-actions">
            <!-- Buttons -->
            <button type="submit" class="btn">@T("Login")</button>
            <button type="reset" class="btn">@T("Reset")</button>
        </div>
    }
    @if (userCanRegister) {
        <hr />
        <div class="lregister">
            Don't have Account? @Html.ActionLink(T("Register").Text, "Register")<br />
            @if (enableLostPassword) { @Html.ActionLink(T("Lost your Password?").Text, "RequestLostPassword") }
        </div>
    }
</div>
<commit_msg>Fixed so you can get a lost password even if you can't register<commit_after>﻿@using Orchard.ContentManagement

@{
    var userCanRegister = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
    var enableLostPassword = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().EnableLostPassword;
}
<div class="well logreg">
    <h3>Sign In to @WorkContext.CurrentSite.SiteName</h3>
    <hr />
    @using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { @class = "form-horizontal" })) {
        <!-- Username -->
        <div class="control-group">
            <label class="control-label" for="userNameOrEmail">@T("Username")</label>
            <div class="controls">
                @Html.TextBox("userNameOrEmail", "", new { id = "username-email", @class = "input-large", autofocus = "autofocus" })
                @Html.ValidationMessage("userNameOrEmail")
            </div>
        </div>
        <!-- Password -->
        <div class="control-group">
            <label class="control-label" for="password">@T("Password")</label>
            <div class="controls">
                @Html.Password("password", string.Empty, new { @class = "input-large" })
                @Html.ValidationMessage("password")
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <label class="checkbox">
                    @Html.CheckBox("rememberMe", new { id = "remember-me" })
                    @T("Remember me")
                </label>
            </div>
        </div>
        <!-- Buttons -->
        <div class="form-actions">
            <!-- Buttons -->
            <button type="submit" class="btn">@T("Login")</button>
            <button type="reset" class="btn">@T("Reset")</button>
        </div>
    }
    @if (userCanRegister || enableLostPassword) {
        <hr />
        <div class="lregister">
           @if  (userCanRegister) { 
               @:Don't have Account? @Html.ActionLink(T("Register").Text, "Register")<br>
           }
           @if (enableLostPassword) { @Html.ActionLink(T("Lost your Password?").Text, "RequestLostPassword") }
        </div>
    }
</div>

{'fraction_non_alphanumeric': 0.1636005256241787, 'fraction_numerical': 0.0008760402978537013, 'mean_word_length': 2.147484493452791, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4037879', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1255, 'n_words': 223}