From c2f46861bc8fb7180abdba7a9d361baf8532edab Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Mon, 1 Nov 2010 13:16:55 -0700 Subject: [PATCH] Hiding the Register link if registering is not allowed (by default) --HG-- branch : dev --- .../Modules/Orchard.Users/Views/Account/LogOn.cshtml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml index b076b3bd0..f3a65a961 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml @@ -1,7 +1,12 @@ @model Orchard.Users.ViewModels.LogOnViewModel +@using Orchard.ContentManagement; + +@{ + var userCanRegister = @WorkContext.CurrentSite.As().UsersCanRegister; +}

@Html.TitleForPage(Model.Title)

-

@T("Please enter your username and password.") @Html.ActionLink("Register", "Register") @T(" if you don't have an account.")

+

@T("Please enter your username and password.") @if(userCanRegister) { @Html.ActionLink("Register", "Register") @T(" if you don't have an account.") }

@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"]}))) {