mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-02 19:44:02 +08:00
#17248: Orchard.Users options dependent on Orchard.Email should not be available
Work Item: 17248 --HG-- branch : 1.x
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
@model Orchard.Users.Models.RegistrationSettingsPartRecord
|
||||
@using Orchard.Messaging.Services;
|
||||
|
||||
@{
|
||||
var messageManager = WorkContext.Resolve<IMessageManager>();
|
||||
var emailEnabled = messageManager.GetAvailableChannelServices().Contains("email");
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<legend>@T("Users")</legend>
|
||||
@@ -7,11 +13,11 @@
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersCanRegister)">@T("Users can create new accounts on the site")</label>
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.EnableLostPassword)
|
||||
<input type="checkbox" class="check-box" id="@Html.FieldIdFor(m => m.EnableLostPassword)" name="@Html.FieldNameFor(m => m.EnableLostPassword)" @(emailEnabled ? "" : "disabled=\"disabled\"")/>
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.EnableLostPassword)">@T("Display a link to enable users to reset their password")</label>
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.UsersMustValidateEmail)
|
||||
<input type="checkbox" class="check-box" id="@Html.FieldIdFor(m => m.UsersMustValidateEmail)" name="@Html.FieldNameFor(m => m.UsersMustValidateEmail)" @(emailEnabled ? "" : "disabled=\"disabled\"")/>
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersMustValidateEmail)">@T("Users must verify their email address")</label>
|
||||
</div>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.UsersMustValidateEmail)">
|
||||
@@ -30,7 +36,7 @@
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.UsersAreModerated)">@T("Users must be approved before they can log in")</label>
|
||||
</div>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.UsersAreModerated)">
|
||||
@Html.EditorFor(m => m.NotifyModeration)
|
||||
<input type="checkbox" class="check-box" id="@Html.FieldIdFor(m => m.NotifyModeration)" name="@Html.FieldNameFor(m => m.NotifyModeration)" @(emailEnabled ? "" : "disabled=\"disabled\"")/>
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor( m => m.NotifyModeration)">@T("Send a notification when a user needs moderation")</label>
|
||||
</div>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.NotifyModeration)">
|
||||
|
||||
Reference in New Issue
Block a user