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

Commit

Permalink
Changes for 01.02.01 milestone
Browse files Browse the repository at this point in the history
  • Loading branch information
peppertree committed Jun 26, 2014
1 parent 8f68c68 commit 9c9c247
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 224 deletions.
24 changes: 24 additions & 0 deletions App_LocalResources/Settings.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,28 @@
<data name="StatusPending.Text" xml:space="preserve">
<value>Pending</value>
</data>
<data name="lblPrivateCaptchaKey.Help" xml:space="preserve">
<value>Enter the private key from your captcha account. (Get your key &lt;a href="https://www.google.com/recaptcha/admin#whyrecaptcha" target="_blank"&gt;here&lt;/a&gt;)</value>
</data>
<data name="lblPrivateCaptchaKey.Text" xml:space="preserve">
<value>Private reCaptcha Key:</value>
</data>
<data name="lblCompareFirstNameLastName.Help" xml:space="preserve">
<value>If checked, a check is being done if the firstname is not equal to the lastname. Note that you will have to setup your form template to include both fields!</value>
</data>
<data name="lblCompareFirstNameLastName.Text" xml:space="preserve">
<value>Compare firstname with lastname:</value>
</data>
<data name="lblEmailRegex.Help" xml:space="preserve">
<value>Enter the regular expression for validating e-mail adresses</value>
</data>
<data name="lblEmailRegex.Text" xml:space="preserve">
<value>Regex Validation for E-Mail Adresses:</value>
</data>
<data name="lblValidateEmailThroughRegex.Help" xml:space="preserve">
<value>If checked, e-mail adresses will be verified against the regular expression below</value>
</data>
<data name="lblValidateEmailThroughRegex.Text" xml:space="preserve">
<value>Validate e-mail through Regex:</value>
</data>
</root>
5 changes: 4 additions & 1 deletion App_LocalResources/Templates.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<data name="cmdDeleteSelected.Text" xml:space="preserve">
<value>Delete Selected</value>
</data>
<data name="cmdUpdateSettings.Text" xml:space="preserve">
<data name="cmdUpdateExit.Text" xml:space="preserve">
<value>Save Templates and Exit</value>
</data>
<data name="lblConfirmDelete.Text" xml:space="preserve">
Expand Down Expand Up @@ -204,4 +204,7 @@
<data name="plLocale.Text" xml:space="preserve">
<value>Template Locale:</value>
</data>
<data name="cmdUpdate.Text" xml:space="preserve">
<value>Save Templates</value>
</data>
</root>
6 changes: 6 additions & 0 deletions App_LocalResources/View.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,10 @@
<data name="VerifyAccount.Action" xml:space="preserve">
<value>The e-mail address needs to be verified</value>
</data>
<data name="Error_LastnameLikeFirstname.Text" xml:space="preserve">
<value>The firstname and lastname may not be identical</value>
</data>
<data name="lblEmailRegex.Text" xml:space="preserve">
<value />
</data>
</root>
20 changes: 20 additions & 0 deletions Settings.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,24 @@
<div class="dnnFormItem">
<dnn:Label ID="lblInterface" runat="server" Text="External Interface:"></dnn:Label>
<asp:TextBox ID="txtInterface" runat="server"></asp:TextBox>
</div>

<div class="dnnFormItem">
<dnn:Label ID="lblPrivateCaptchaKey" runat="server" Text="External Interface:"></dnn:Label>
<asp:TextBox ID="txtPrivateCaptchaKey" runat="server"></asp:TextBox>
</div>

<div class="dnnFormItem">
<dnn:Label ID="lblCompareFirstNameLastName" runat="server" Text="Compare Firstname and Lastname:"></dnn:Label>
<asp:CheckBox ID="chkCompareFirstNameLastName" runat="server" />
</div>

<div class="dnnFormItem">
<dnn:Label ID="lblValidateEmailThroughRegex" runat="server" Text="Validate e-mail through Regex:"></dnn:Label>
<asp:CheckBox ID="chkValidateEmailThroughRegex" runat="server" />
</div>

<div class="dnnFormItem">
<dnn:Label ID="lblEmailRegex" runat="server" Text="Regex Validation for E-Mail Adresses:"></dnn:Label>
<asp:TextBox ID="txtEmailRegex" runat="server"></asp:TextBox>
</div>
72 changes: 72 additions & 0 deletions Settings.ascx.designer.vb

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

34 changes: 25 additions & 9 deletions Settings.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Imports DotNetNuke
Imports DotNetNuke.Services.Exceptions
Imports DotNetNuke.Entities.Tabs
Imports DotNetNuke.Common.Utilities
Imports DotNetNuke.Entities.Users

Namespace Connect.Modules.UserManagement.AccountRegistration
Partial Class Settings
Expand All @@ -17,15 +18,26 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
BindPages()
BindRoles()

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("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
If (Settings.Contains("NotifyUser")) Then chkNotifyUser.Checked = CType(Settings("NotifyUser"), Boolean)
If (Settings.Contains("AddToRoleStatus")) Then drpRoleStatus.SelectedValue = CType(Settings("AddToRoleStatus"), String)
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("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
If (settings.Contains("NotifyUser")) Then chkNotifyUser.Checked = CType(settings("NotifyUser"), Boolean)
If (settings.Contains("AddToRoleStatus")) Then drpRoleStatus.SelectedValue = CType(settings("AddToRoleStatus"), String)
If (settings.Contains("ReCaptchaKey")) Then txtPrivateCaptchaKey.Text = CType(settings("ReCaptchaKey"), String)
If (Settings.Contains("CompareFirstNameLastName")) Then chkCompareFirstNameLastName.Checked = CType(Settings("CompareFirstNameLastName"), Boolean)
If (Settings.Contains("ValidateEmailThroughRegex")) Then chkValidateEmailThroughRegex.Checked = CType(Settings("ValidateEmailThroughRegex"), Boolean)
If Settings.Contains("EmailRegex") Then
txtEmailRegex.Text = CType(Settings("EmailRegex"), String)
Else
Try
txtEmailRegex.Text = UserController.GetUserSettings(PortalId)("Security_EmailValidation")
Catch
End Try
End If

End If
Catch exc As Exception 'Module failed to load
Expand All @@ -37,6 +49,7 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
Try
Dim objModules As New Entities.Modules.ModuleController

objModules.UpdateTabModuleSetting(TabModuleId, "ReCaptchaKey", txtPrivateCaptchaKey.Text)
objModules.UpdateTabModuleSetting(TabModuleId, "ExternalInterface", txtInterface.Text)
objModules.UpdateTabModuleSetting(TabModuleId, "ShowUserName", drpUsernameMode.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "ShowDisplayName", drpDisplaynameMode.SelectedValue)
Expand All @@ -47,6 +60,9 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
objModules.UpdateTabModuleSetting(TabModuleId, "NotifyRole", drpNotifyRole.SelectedItem.Text)
objModules.UpdateTabModuleSetting(TabModuleId, "NotifyUser", chkNotifyUser.Checked.ToString)
objModules.UpdateTabModuleSetting(TabModuleId, "AddToRoleStatus", drpRoleStatus.SelectedValue)
objModules.UpdateTabModuleSetting(TabModuleId, "CompareFirstNameLastName", chkCompareFirstNameLastName.Checked.ToString)
objModules.UpdateTabModuleSetting(TabModuleId, "ValidateEmailThroughRegex", chkValidateEmailThroughRegex.Checked.ToString)
objModules.UpdateTabModuleSetting(TabModuleId, "EmailRegex", txtEmailRegex.Text)

Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
Expand Down
3 changes: 2 additions & 1 deletion Templates.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
</div>

<ul class="dnnActions">
<li><asp:LinkButton ID="cmdUpdateSettings" runat="server" CssClass="dnnPrimaryAction"></asp:LinkButton></li>
<li><asp:LinkButton ID="cmdUpdate" runat="server" CssClass="dnnPrimaryAction"></asp:LinkButton></li>
<li><asp:LinkButton ID="cmdUpdateExit" runat="server" CssClass="dnnPrimaryAction"></asp:LinkButton></li>
<li><asp:LinkButton ID="cmdCancel" runat="server" CssClass="dnnSecondaryAction"></asp:LinkButton></li>
</ul>

Expand Down
13 changes: 11 additions & 2 deletions Templates.ascx.designer.vb

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

21 changes: 17 additions & 4 deletions Templates.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
BindSelectedTheme()
End Sub

Private Sub cmdUpdateSettings_Click(sender As Object, e As System.EventArgs) Handles cmdUpdateSettings.Click
Private Sub cmdUpdate_Click(sender As Object, e As System.EventArgs) Handles cmdUpdate.Click

Dim blnSucess As Boolean = False

Expand All @@ -61,14 +61,26 @@ Namespace Connect.Modules.UserManagement.AccountRegistration

End Sub

Private Sub cmdDeleteSelected_Click(sender As Object, e As System.EventArgs) Handles cmdDeleteSelected.Click
Private Sub cmdUpdateExit_Click(sender As Object, e As System.EventArgs) Handles cmdUpdateExit.Click

Dim blnSucess As Boolean = False

SaveTemplates(blnSucess)

If blnSucess Then
UpdateSettings()
End If

Response.Redirect(NavigateURL())

End Sub

Private Sub cmdDeleteSelected_Click(sender As Object, e As System.EventArgs) Handles cmdDeleteSelected.Click
Try
DeleteTheme()
Catch ex As Exception
DotNetNuke.UI.Skins.Skin.AddModuleMessage(Me, Localization.GetString("lblDeleteThemeError", LocalResourceFile), ModuleMessage.ModuleMessageType.RedError)
End Try

End Sub

Private Sub cmdCancel_Click(sender As Object, e As System.EventArgs) Handles cmdCancel.Click
Expand Down Expand Up @@ -100,7 +112,8 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
Private Sub LocalizeForm()

cmdCancel.Text = Localization.GetString("cmdCancel", LocalResourceFile)
cmdUpdateSettings.Text = Localization.GetString("cmdUpdateSettings", LocalResourceFile)
cmdUpdateExit.Text = Localization.GetString("cmdUpdateExit", LocalResourceFile)
cmdUpdate.Text = Localization.GetString("cmdUpdate", LocalResourceFile)
cmdCopySelected.Text = Localization.GetString("cmdCopySelected", LocalResourceFile)
cmdDeleteSelected.Text = Localization.GetString("cmdDeleteSelected", LocalResourceFile)

Expand Down
Loading

0 comments on commit 9c9c247

Please sign in to comment.