diff --git a/css/login/Changepw.css b/css/login/Changepw.css index cd99c72..81ca80f 100644 --- a/css/login/Changepw.css +++ b/css/login/Changepw.css @@ -38,6 +38,41 @@ content: '✖'; color: red; } + +#txt_Pw_WH_M:invalid { + background-color: indianred; + border-color: red; + color: red; +} + +#txt_Pw_WH_M:valid { + background-color: lightgreen; + border-color: forestgreen; + color: black; +} + +#txt_Pw_M:invalid + span::before { + content: '✖'; + color: red; +} + +#txt_Pw_M:invalid { + background-color: indianred; + border-color: red; + color: red; +} + +#txt_Pw_M:valid { + background-color: lightgreen; + border-color: forestgreen; + color: black; +} + +#txt_Pw_M:invalid + span::before { + content: '✖'; + color: red; +} + #tbl_main { font-family: Arial; font-size: 11px; diff --git a/login/ChangePW.aspx b/login/ChangePW.aspx index 0c98dff..ab03c07 100644 --- a/login/ChangePW.aspx +++ b/login/ChangePW.aspx @@ -6,6 +6,20 @@ <%@ import Namespace="MySql.Data.MySqlClient"%> + + + + + + + + + + + + + + VERAG Spedition AG Passwort vergessen @@ -63,16 +77,70 @@ } @@ -80,50 +148,105 @@
- - - - - - - - - - - - - - - - + + + + + + + +
- -
- - - -
- - - -
- -
- - - - - + +
+ + + + + + + + + - - -
+ +
+ + + +
+ + +
+
+ +
+ + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + +
+ +
+ + + + + +
+
- + + + diff --git a/login/ChangePW.aspx.vb b/login/ChangePW.aspx.vb index 00f9586..8e33403 100644 --- a/login/ChangePW.aspx.vb +++ b/login/ChangePW.aspx.vb @@ -53,39 +53,67 @@ Partial Class login_ChangePW Protected Sub btn_submitpw_Click(sender As Object, e As EventArgs) Dim tempstr As String = "" Dim Msg, Style, Title As String - reqPasswtxt.Validate() - reqPassw1txt.Validate() - If confirmPasswordReq.IsValid = True Then + + If String.IsNullOrEmpty(txt_Pw.Text) = Not True AndAlso String.IsNullOrEmpty(txt_Pw_WH.Text) = Not True AndAlso String.IsNullOrEmpty(txt_Pw_M.Text) = True AndAlso String.IsNullOrEmpty(txt_Pw_WH_M.Text) = True Then + + reqPasswtxt.Validate() + reqPassw1txt.Validate() + reqPassw1txt_M.Enabled = False + reqPasswtxt.Enabled = False tempstr = txt_Pw.Text + ElseIf String.IsNullOrEmpty(txt_Pw.Text) = True AndAlso String.IsNullOrEmpty(txt_Pw_WH.Text) = True AndAlso String.IsNullOrEmpty(txt_Pw_M.Text) = Not True AndAlso String.IsNullOrEmpty(txt_Pw_WH_M.Text) = Not True Then + + reqPasswtxt.Enabled = False + reqPassw1txt.Enabled = False + reqPasswtxt_M.Validate() + reqPassw1txt_M.Validate() + tempstr = txt_Pw_M.Text Else tempstr = "Error01" - End If - If txt_Pw.Text = tempstr Then - Msg = "PW erfolgreich geändert!" - Style = vbOKOnly + vbInformation + vbDefaultButton1 - Title = "Information" - MsgBox(Msg, Style, Title) - - If MsgBox(Msg, Style, Title).Ok Then - Response.Redirect("login_FLEX.aspx") End If - ElseIf tempstr = "Error01" Then - Msg = "PW nicht erfolgreich geändert!" - Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1 - Title = "Error" - MsgBox(Msg, Style, Title) - If MsgBox(Msg, Style, Title).Retry Then - Response.Redirect(Request.RawUrl) - ElseIf MsgBox(Msg, Style, Title).Abort Then - Response.Redirect("../newPageJulius_Sidebar.aspx") - ElseIf MsgBox(Msg, Style, Title).Ignore Then - Try - Catch ex As Exception - End Try + If txt_Pw.Text = tempstr And txt_Pw_WH.Text = tempstr AndAlso txt_Pw_M.Text = String.Empty And txt_Pw_WH_M.Text = String.Empty Then + Msg = "PW erfolgreich geändert!" + Style = vbOKOnly + vbInformation + vbDefaultButton1 + Title = "Information" + regexval_txt_Pw.ForeColor = Drawing.Color.Green + regexval_txt_Pw.Text = "Password has been changed successfully!" + 'MsgBox(Msg, Style, Title) + + ' If MsgBox(Msg, Style, Title).Ok Then + 'Response.Redirect("login_FLEX.aspx") + 'End If + ElseIf txt_Pw_M.Text = tempstr And txt_Pw_WH_M.Text = tempstr AndAlso txt_Pw.Text = String.Empty And txt_Pw_M.Text = String.Empty Then + Msg = "PW erfolgreich geändert!" + Style = vbOKOnly + vbInformation + vbDefaultButton1 + Title = "Information" + regexval_txt_Pw.ForeColor = Drawing.Color.Green + regexval_txt_Pw.Text = "Password has been changed successfully!" + 'MsgBox(Msg, Style, Title) + + ' If MsgBox(Msg, Style, Title).Ok Then + 'Response.Redirect("login_FLEX.aspx") + 'End If + ElseIf tempstr = "Error01" Then + regexval_txt_Pw.ForeColor = Drawing.Color.MediumVioletRed + regexval_txt_Pw.Text = "Password has not been changed successfully!" + ' Msg = "PW nicht erfolgreich geändert!" + ' Style = vbAbortRetryIgnore + vbCritical + vbDefaultButton1 + ' Title = "Error" + 'MsgBox(Msg, Style, Title) + 'If MsgBox(Msg, Style, Title).Retry Then + 'Response.Redirect(Request.RawUrl) + 'ElseIf MsgBox(Msg, Style, Title).Abort Then + ' Response.Redirect("../newPageJulius_Sidebar.aspx") + 'ElseIf MsgBox(Msg, Style, Title).Ignore Then + ' Try + + ' Catch ex As Exception + + ' End Try End If - End If + End Sub Protected Sub txt_Pw_TextChanged(sender As Object, e As EventArgs) @@ -119,4 +147,8 @@ Partial Class login_ChangePW End If End Function + + Protected Sub Image1_M_Click(sender As Object, e As ImageClickEventArgs) + MsgBox("") + End Sub End Class diff --git a/login/ForgotPW.aspx b/login/ForgotPW.aspx index 8ebd00a..47059db 100644 --- a/login/ForgotPW.aspx +++ b/login/ForgotPW.aspx @@ -318,7 +318,7 @@ - + diff --git a/login/ForgotPW.aspx.vb b/login/ForgotPW.aspx.vb index 6ba46e0..9efdaaf 100644 --- a/login/ForgotPW.aspx.vb +++ b/login/ForgotPW.aspx.vb @@ -17,17 +17,21 @@ Partial Class login_ForgotPW Dim password As String = String.Empty Dim email As String = String.Empty Dim tokenname As String = String.Empty - If txtEmail_M.Text = String.Empty And txt_Username_M.Text = String.Empty Then + If txtEmail.Text = String.Empty And txt_Username_M.Text = String.Empty Then valreqtxtEmail_M.Enabled = False + valreqtxtEmail.Enabled = True + regexval_txt_Email_2.Enabled = True + regexval_txt_Email.Enabled = True + regexval_2_txt_Email_M.Enabled = False valreqtxtEmail.Validate() check_UserName_regex.Validate() If valreqtxtEmail.IsValid = True AndAlso check_UserName_regex.IsValid = True Then email = txtEmail.Text - username = txt_Username.Text + username = txt_Username_M.Text ElseIf valreqtxtEmail.IsValid = False Then valreqtxtEmail.ErrorMessage = "Annotation: The given Domain is not the company domain." regexval_txt_Email.Validate() - valreqtxtEmail.IsValid = True + regexval_txt_Email_2.IsValid = True If check_UserName_regex.IsValid = False Then check_UserName_regex.ErrorMessage = "Annotation: The Username does not match the requirements." Else @@ -36,7 +40,9 @@ Partial Class login_ForgotPW End If Else valreqtxtEmail_M.Enabled = True - valreqtxtEmail.Enabled = False + regexval_txt_Email.Enabled = False + regexval_txt_Email_2.Enabled = False + regexval_2_txt_Email_M.Enabled = True valreqtxtEmail_M.Validate() check_UserName_regex_M.Validate() If valreqtxtEmail_M.IsValid = True AndAlso check_UserName_regex_M.IsValid = True Then @@ -44,7 +50,7 @@ Partial Class login_ForgotPW username = txt_Username_M.Text ElseIf valreqtxtEmail_M.IsValid = False Then valreqtxtEmail_M.ErrorMessage = "Annotation: The given Domain is not the company domain." - regexval_txt_Email_M.Validate() + regexval_2_txt_Email_M.Validate() valreqtxtEmail_M.IsValid = True If check_UserName_regex_M.IsValid = False Then check_UserName_regex_M.ErrorMessage = "Annotation: The Username does not match the requirements." @@ -77,24 +83,40 @@ Partial Class login_ForgotPW password = dr("Password").ToString() email = dr("Email").ToString() Try - If txt_Username.Text = dr("Username").ToString() Then + If txt_Username.Text = dr("Username").ToString() And String.IsNullOrEmpty(txt_Username_M.Text) = True Then + check_UserName_regex_M.Enabled = False + check_UserName_regex.Enabled = True check_UserName_regex.IsValid = True username = txt_Username.Text - Else + ElseIf txt_Username_M.Text = dr("Username").ToString() And String.IsNullOrEmpty(txt_Username.Text) = True Then + check_UserName_regex.Enabled = False + check_UserName_regex_M.Enabled = True + check_UserName_regex_M.IsValid = True + username = txt_Username_M.Text + ElseIf String.IsNullOrEmpty(txt_Username_M.Text) = True AndAlso String.IsNullOrEmpty(txtEmail_M.Text) = True Then + check_UserName_regex_M.MatchTimeout = 3000 + check_UserName_regex_M.ErrorMessage = "No valid Username found in out database!" + check_UserName_regex_M.IsValid = False + ElseIf String.IsNullOrEmpty(txt_Username.Text) = False Then check_UserName_regex.MatchTimeout = 3000 check_UserName_regex.ErrorMessage = "No valid Username found in out database!" check_UserName_regex.IsValid = False End If - If txtEmail.Text = dr("Email").ToString() Then + If (txtEmail.Text = dr("Email").ToString() And txtEmail_M.Text = String.Empty) Then + regexval_txt_Email_M.Enabled = False + regexval_txt_Email.Enabled = True regexval_txt_Email.Validate() email = txtEmail.Text - lblMessage.ForeColor = Color.Green lblMessage.Text = "The given e-mail exists in our database." + ElseIf (txtEmail_M.Text = dr("Email").ToString() And txtEmail.Text = String.Empty) Then + regexval_txt_Email_M.Validate() + email = txtEmail_M.Text + lblMessage_M.ForeColor = Color.Green + lblMessage_M.Text = "The given e-mail exists in our database." Else - - lblMessage.ForeColor = Color.Red - lblMessage.Text = "The given e-mail does not exist in our database." + lblMessage_M.ForeColor = Color.Red + lblMessage_M.Text = "The given e-mail does not exist in our database." End If Catch ex As Exception