From 0067521cd5ef670c607ab9d930013e10017afb2a Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Tue, 21 May 2019 12:21:24 -0400 Subject: [PATCH] Fix issue where module title was not displayed correctly in module settings UI --- Oqtane.Client/Shared/Pane.razor | 11 +++++++---- Oqtane.Client/Themes/Controls/ModuleTitle.razor | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Oqtane.Client/Shared/Pane.razor b/Oqtane.Client/Shared/Pane.razor index d7e3e0b6..549e353e 100644 --- a/Oqtane.Client/Shared/Pane.razor +++ b/Oqtane.Client/Shared/Pane.razor @@ -74,11 +74,14 @@ } if (authorized) { - // get module control title - string title = (string)moduleType.GetProperty("Title").GetValue(moduleobject); - if (title != "") + if (PageState.Control != "Settings") { - module.Title = title; + // get module control title + string title = (string)moduleType.GetProperty("Title").GetValue(moduleobject); + if (title != "") + { + module.Title = title; + } } builder.OpenComponent(0, Type.GetType(Constants.DefaultContainer)); builder.AddAttribute(1, "ModuleState", module); diff --git a/Oqtane.Client/Themes/Controls/ModuleTitle.razor b/Oqtane.Client/Themes/Controls/ModuleTitle.razor index 8b892200..12f88728 100644 --- a/Oqtane.Client/Themes/Controls/ModuleTitle.razor +++ b/Oqtane.Client/Themes/Controls/ModuleTitle.razor @@ -1,4 +1,17 @@ @using Oqtane.Themes @inherits ContainerBase -@ModuleState.Title +@title + +@functions { + string title = ""; + + protected override void OnInit() + { + title = ModuleState.Title; + if (PageState.Control == "Settings") + { + title = PageState.Control; + } + } +}