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

Commit

Permalink
Cleanup Form Template & Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
peppertree committed Jun 26, 2014
1 parent c211d8b commit 81c38d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
22 changes: 0 additions & 22 deletions Templates/Default/Form.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,6 @@
[REQUIRED:USER:Password2]
</div>

<div class="dnnFormItem dnnClear">
[DNNLBL:USER:PasswordQuestion:HideRequired]
[CTL:USER:PasswordQuestion]
[REQUIRED:USER:PasswordQuestion]
</div>

<div class="dnnFormItem dnnClear">
[DNNLBL:USER:PasswordAnswer:HideRequired]
[CTL:USER:PasswordAnswer]
[REQUIRED:USER:PasswordAnswer]
</div>

<div>Would you like to join the DNN-Connect Association?</div>

<div class="dnnFormItem dnnClear">
[DNNLBL:STATIC:Yes, join:Check here if you want to join the association]
[CTL:ROLEMEMBERSHIP:Association Member:Pending]
</div>

<div>
[RECAPTCHA:6LeT2vUSAAAAAK9YCM_6tQw3dbNUYnDVnEi4XEnQ]
</div>
<ul class="dnnActions">
<li>[CTL:UPDATEBUTTON:CreateAccount]</li>
</ul>
Expand Down
15 changes: 7 additions & 8 deletions View.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,6 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
Dim txtLastName As TextBox = CType(FindControlRecursive(plhRegister, plhRegister.ID & "_" & Constants.ControlId_Lastname), TextBox)
blnUpdateLastname = (Not txtLastName Is Nothing)


If CompareFirstNameLastName AndAlso (blnUpdateFirstname And blnUpdateLastname) Then
If txtLastName.Text.ToLower.Trim = txtFirstName.Text.ToLower.Trim Then
strMessages.Add("Error_LastnameLikeFirstname")
AddErrorIndicator(Constants.User_Firstname, plhRegister)
End If
End If

If blnUpdateLastname Then
If Not IsValidUserAttribute(Constants.User_Lastname, plhRegister) Then
strMessages.Add("Error_MissingLastname")
Expand All @@ -272,6 +264,13 @@ Namespace Connect.Modules.UserManagement.AccountRegistration
End If
End If

If CompareFirstNameLastName AndAlso (blnUpdateFirstname And blnUpdateLastname) Then
If txtLastName.Text.ToLower.Trim = txtFirstName.Text.ToLower.Trim Then
strMessages.Add("Error_LastnameLikeFirstname")
AddErrorIndicator(Constants.User_Firstname, plhRegister)
End If
End If

Dim txtDisplayName As TextBox = CType(FindControlRecursive(plhRegister, plhRegister.ID & "_" & Constants.ControlId_Displayname), TextBox)
blnUpdateDisplayname = (Not txtDisplayName Is Nothing)

Expand Down

0 comments on commit 81c38d5

Please sign in to comment.