Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Commit

Permalink
Adding support for RedirectAfterLogin. See #7
Browse files Browse the repository at this point in the history
  • Loading branch information
peppertree committed Sep 29, 2014
1 parent 9fd85e2 commit ca3ddd7
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
6 changes: 6 additions & 0 deletions App_LocalResources/Settings.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,10 @@
<data name="lblValidateEmailThroughRegex.Text" xml:space="preserve">
<value>Validate e-mail through Regex:</value>
</data>
<data name="lblRedirectAfterLogin.Help" xml:space="preserve">
<value>If the template also allows users to login using this module you may define a page that the user is being redirected to after logging in</value>
</data>
<data name="lblRedirectAfterLogin.Text" xml:space="preserve">
<value>Redirect after login:</value>
</data>
</root>
6 changes: 6 additions & 0 deletions Settings.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
</asp:DropDownList>
</div>


<div class="dnnFormItem">
<dnn:Label ID="lblRedirectAfterLogin" runat="server" Text="Redirect after login:"></dnn:Label>
<asp:DropDownList ID="drpRedirectAfterLogin" runat="server" DataTextField="IndentedTabName" DataValueField="TabId" />
</div>

<div class="dnnFormItem">
<dnn:Label ID="lblRedirectAfterSubmit" runat="server" Text="Redirect after submit:"></dnn:Label>
<asp:DropDownList ID="drpRedirectAfterSubmit" runat="server" DataTextField="IndentedTabName" DataValueField="TabId" />
Expand Down
18 changes: 18 additions & 0 deletions Settings.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Settings.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
If (settings.Contains("ExternalInterface")) Then txtInterface.Text = settings("ExternalInterface").ToString()
If (settings.Contains("ShowUserName")) Then drpUsernameMode.SelectedValue = settings("ShowUserName").ToString()
If (settings.Contains("ShowDisplayName")) Then drpDisplaynameMode.SelectedValue = settings("ShowDisplayName").ToString()
If (settings.Contains("RedirectAfterSubmit")) Then drpRedirectAfterSubmit.SelectedValue = settings("RedirectAfterSubmit").ToString()
If (Settings.Contains("RedirectAfterSubmit")) Then drpRedirectAfterSubmit.SelectedValue = Settings("RedirectAfterSubmit").ToString()
If (Settings.Contains("RedirectAfterLogin")) Then drpRedirectAfterLogin.SelectedValue = Settings("RedirectAfterLogin").ToString()
If (settings.Contains("UsermanagementTab")) Then drpUserManagementTab.SelectedValue = settings("UsermanagementTab").ToString()
If (settings.Contains("AddToRoleOnSubmit")) Then drpAddToRole.SelectedValue = settings("AddToRoleOnSubmit").ToString()
If (settings.Contains("NotifyRole")) Then drpNotifyRole.Items.FindByText(settings("NotifyRole").ToString()).Selected = True
Expand Down Expand Up @@ -74,6 +75,7 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
objModules.UpdateTabModuleSetting(TabModuleId, "ShowUserName", drpUsernameMode.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "ShowDisplayName", drpDisplaynameMode.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "RedirectAfterSubmit", drpRedirectAfterSubmit.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "RedirectAfterLogin", drpRedirectAfterLogin.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "UsermanagementTab", drpUserManagementTab.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "AddToRoleOnSubmit", drpAddToRole.SelectedValue)
'we need the rolename for sending mails to users, therefor store here the rolename rather than the id!
Expand All @@ -96,6 +98,9 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
drpRedirectAfterSubmit.DataSource = tabs
drpRedirectAfterSubmit.DataBind()

drpRedirectAfterLogin.DataSource = tabs
drpRedirectAfterLogin.DataBind()

drpUserManagementTab.DataSource = tabs
drpUserManagementTab.DataBind()

Expand Down

0 comments on commit ca3ddd7

Please sign in to comment.