Fixed Self-Signup link in menu
This commit is contained in:
@@ -152,6 +152,11 @@ namespace Swarmops.Interface.Objects
|
||||
/// <summary>
|
||||
/// SPECIAL CASE: Close Books menu item
|
||||
/// </summary>
|
||||
SpecialCloseBooks
|
||||
SpecialCloseBooks,
|
||||
|
||||
/// <summary>
|
||||
/// SPECIAL CASE: Self-signup menu item
|
||||
/// </summary>
|
||||
SpecialSelfSignup
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,19 @@ namespace Swarmops.Controls.Base
|
||||
string localizedText = "RESOURCE NOT FOUND";
|
||||
string prettyNavUrl = menuItem.NavigateUrl ?? string.Empty;
|
||||
|
||||
if (menuItem.Type == MenuItemType.SpecialSelfSignup)
|
||||
{
|
||||
if (string.IsNullOrEmpty (CurrentOrganization.VanityDomain))
|
||||
{
|
||||
prettyNavUrl = "/Signup?OrganizationId=" + CurrentOrganization.Identity;
|
||||
}
|
||||
else
|
||||
{
|
||||
prettyNavUrl = "//" + CurrentOrganization.VanityDomain + "/Signup";
|
||||
}
|
||||
menuItem.Type = MenuItemType.Link; // once the link is set, change to type Link to go into normal logic
|
||||
}
|
||||
|
||||
if (!Debugger.IsAttached)
|
||||
{
|
||||
prettyNavUrl = prettyNavUrl.Replace ("/Pages/v5/", "/").Replace (".aspx", "");
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
"{0}Default.aspx", // for dev.swarmops.com/
|
||||
"{0}.aspx", // for dev.swarmops.com/Security/Login
|
||||
"/Pages/v5/Public{0}.aspx", // for dev.swarmops.com/Signup (and others under Public)
|
||||
"/Pages/v5/Public{0}", // for dev.swarmops.com/WizardStyle.css (linked from pages in Public)
|
||||
"/Pages/v5{0}.aspx", // for dev.swarmops.com/User/SelectLanguage
|
||||
"/Pages/v5{0}" // for dev.swarmops.com/Ledgers/Json-SomethingData.aspx
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<ResourceKey>People_SelfSignup</ResourceKey>
|
||||
<UserLevel>2</UserLevel>
|
||||
<Permissions />
|
||||
<Type>Disabled</Type>
|
||||
<Type>SelfSignup</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user