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

Add AddTenantReloadWarningWrapper() helpful extension #16532

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -55,7 +55,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, EmailSettings s
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<EmailSettingsViewModel>("EmailSettings_Edit", async model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, HttpsSettings s
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<HttpsSettingsViewModel>("HttpsSettings_Edit", async model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, LocalizationSet
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<LocalizationSettingsViewModel>("LocalizationSettings_Edit", model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, OpenIdClientSet
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<OpenIdClientSettingsViewModel>("OpenIdClientSettings_Edit", model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public OpenIdServerSettingsDisplayDriver(IOpenIdServerService serverService)

public override IDisplayResult Edit(OpenIdServerSettings settings, BuildEditorContext context)
{
context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<OpenIdServerSettingsViewModel>("OpenIdServerSettings_Edit", async model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public OpenIdValidationSettingsDisplayDriver(IShellHost shellHost)

public override IDisplayResult Edit(OpenIdValidationSettings settings, BuildEditorContext context)
{
context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<OpenIdValidationSettingsViewModel>("OpenIdValidationSettings_Edit", async model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, ReCaptchaSettin
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<ReCaptchaSettingsViewModel>("ReCaptchaSettings_Edit", model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, ReverseProxySet
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<ReverseProxySettingsViewModel>("ReverseProxySettings_Edit", model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, SecuritySetting
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

return Initialize<SecuritySettingsViewModel>("SecurityHeadersSettings_Edit", model =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public override IDisplayResult Edit(ISite site, BuildEditorContext context)
return null;
}

context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
context.AddTenantReloadWarningWrapper();

var result = Combine(
Initialize<SiteSettingsViewModel>("Settings_Edit__Site", model => PopulateProperties(site, model))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace OrchardCore.DisplayManagement.Handlers;

public static class BuildShapeContextExtensions
{
public static void AddTenantReloadWarningWrapper(this BuildShapeContext context)
=> context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
}