Fix issue where module title was not displayed correctly in module settings UI

This commit is contained in:
Shaun Walker
2019-05-21 12:21:24 -04:00
parent 515819111a
commit 0067521cd5
2 changed files with 21 additions and 5 deletions

View File

@ -73,6 +73,8 @@
break;
}
if (authorized)
{
if (PageState.Control != "Settings")
{
// get module control title
string title = (string)moduleType.GetProperty("Title").GetValue(moduleobject);
@ -80,6 +82,7 @@
{
module.Title = title;
}
}
builder.OpenComponent(0, Type.GetType(Constants.DefaultContainer));
builder.AddAttribute(1, "ModuleState", module);
builder.CloseComponent();

View File

@ -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;
}
}
}