Email notification settings get properly persisted and displayed

This commit is contained in:
Bertrand Le Roy
2014-05-04 14:34:47 -07:00
parent 488cd17d75
commit fd8a016c05

View File

@@ -18,19 +18,20 @@
<div>
<label for="CommentSettings_ClosedCommentsDelay">@T("Automatically close comments after")</label>
@Html.TextBoxFor(m => m.ClosedCommentsDelay, new { @class = "text small"}) @T("days")
@Html.TextBoxFor(m => m.ClosedCommentsDelay, new { @class = "text small" }) @T("days")
@Html.ValidationMessage("ClosedCommentsDelay", "*")
<span class="hint">@T("Number of days after comments are automatically closed. Leave to 0 to have them always available.")</span>
</div>
<div>
<input type="checkbox" value="true" class="check-box" id="@Html.FieldIdFor(m => m.NotificationEmail)" name="@Html.FieldNameFor(m => m.NotificationEmail)" @(emailEnabled ? "" : "disabled=\"disabled\"") />
@if (emailEnabled) {
@Html.EditorFor(m => m.NotificationEmail, new { disabled = emailEnabled ? "" : "disabled" })
<label class="forcheckbox" for="CommentSettings_NotificationEmail">@T("Notification email")</label>
@Html.ValidationMessage("NotificationEmail", "*")
<span class="hint">@T("Check to send comment notification emails to the commented content author at their accounts email address.")</span>
@if (!emailEnabled) {
<div class="message message-Warning">@T("This option is available when an email module is activated.")</div>
}
else {
<div class="message message-Warning">@T("The option to send comment notifications is available when an email module is activated.")</div>
}
</div>