Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra warning alert from SmtpSettings.Edit #14299

Merged
merged 6 commits into from
Sep 12, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public DefaultSiteSettingsDisplayDriver(

public override Task<IDisplayResult> EditAsync(ISite site, BuildEditorContext context)
{
if (!IsGeneralSettings(context))
{
return Task.FromResult<IDisplayResult>(null);
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__General");

var result = Combine(
Expand All @@ -49,7 +54,7 @@ public override Task<IDisplayResult> EditAsync(ISite site, BuildEditorContext co

public override async Task<IDisplayResult> UpdateAsync(ISite site, UpdateEditorContext context)
{
if (context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase))
if (IsGeneralSettings(context))
hishamco marked this conversation as resolved.
Show resolved Hide resolved
{
var model = new SiteSettingsViewModel();

Expand Down Expand Up @@ -104,5 +109,8 @@ private static void PopulateProperties(ISite site, SiteSettingsViewModel model)
model.AppendVersion = site.AppendVersion;
model.CacheMode = site.CacheMode;
}

private static bool IsGeneralSettings(BuildEditorContext context)
hishamco marked this conversation as resolved.
Show resolved Hide resolved
=> context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase);
}
}