mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Hiding the Register link if registering is not allowed (by default)
--HG-- branch : dev
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
@model Orchard.Users.ViewModels.LogOnViewModel
|
@model Orchard.Users.ViewModels.LogOnViewModel
|
||||||
|
@using Orchard.ContentManagement;
|
||||||
|
|
||||||
|
@{
|
||||||
|
var userCanRegister = @WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
|
||||||
|
}
|
||||||
|
|
||||||
<h1 class="page-title">@Html.TitleForPage(Model.Title)</h1>
|
<h1 class="page-title">@Html.TitleForPage(Model.Title)</h1>
|
||||||
<p>@T("Please enter your username and password.") @Html.ActionLink("Register", "Register") @T(" if you don't have an account.")</p>
|
<p>@T("Please enter your username and password.") @if(userCanRegister) { <text> </text> @Html.ActionLink("Register", "Register") @T(" if you don't have an account.") }</p>
|
||||||
@Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString())
|
@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"]}))) {
|
@using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new {ReturnUrl = Request.QueryString["ReturnUrl"]}))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user