Änderungen Design

This commit is contained in:
ja
2021-10-08 16:20:15 +02:00
parent 36e6191b5a
commit e24cb9888c
6 changed files with 82 additions and 98 deletions

View File

@@ -120,8 +120,6 @@
</tr>
<tr style="color:#003680;height:36.67px;">
<td>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Timer ID="tmr_PWToken" Interval="1000" runat="server" ClientIDMode="Predictable" OnTick="tmr_PWToken_Tick"></asp:Timer>
<asp:Button ID="btn_submitpw" runat="server" Text="Passwort wechseln" OnClick="btn_submitpw_Click"/>
</td>

View File

@@ -90,20 +90,15 @@ Partial Class login_ChangePW
Function getDateoftoken(tokenname As String) As Boolean
Dim data() As Byte = Convert.FromBase64String(tokenname)
Dim wenn As DateTime = DateTime.FromBinary(BitConverter.ToInt64(data, 0))
tmr_PWToken.Interval = 30000
tmr_PWToken.Enabled = True
If wenn < DateTime.UtcNow.AddMinutes(-3) Then
Return False
tokenname = ""
MsgBox("Token nicht gefunden oder zu alt!" + Environment.NewLine + "Bitte erneut Mail senden!")
Else
tmr_PWToken.Enabled = False
Return True
End If
End Function
Protected Sub tmr_PWToken_Tick(sender As Object, e As EventArgs)
btn_submitpw.Enabled = False
End Sub
End Class

View File

@@ -119,8 +119,6 @@
<asp:Button ID="btn_Send" Text="Send" runat="server" OnClick="SendEmail" />
</td></tr>
<tr><td>
<asp:ScriptManager ID="ScriptManager2" runat="server" />
<asp:Timer ID="Token_tmr" Enabled="false" Interval="1000" runat="server" OnTick="Token_tmr_Tick"></asp:Timer>
</td></tr>
</table>
</center>

View File

@@ -7,9 +7,6 @@ Imports System.Data
Partial Class login_ForgotPW
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs)
If txt_Username.Text = "" Then
Try
@@ -18,7 +15,6 @@ Partial Class login_ForgotPW
MsgBox(ex.Message)
End Try
End If
End Sub
Protected Sub btn_Back_Click(sender As Object, e As EventArgs)
Response.Redirect("login/login_FLEX.aspx")
@@ -165,17 +161,20 @@ Partial Class login_ForgotPW
If MsgBox(Msg, Style, Title).Retry Then
genToken(username, password, email)
If SendEmail(username, password, email, token) = False Then
MsgBox("Email konnte wegen eines internen Verschlüsselungsfehlers nicht gesendet werden.", vbOK + vbInformation + vbDefaultButton1, "TokengenerierungsFehler")
Else
MsgBox("Email wurde erfolgreich gesendet." & vbCr & "Bitte Postfach überprüfen!", vbOK + vbInformation + vbDefaultButton1, "Tokengenerierungs erfolgreich!")
End If
Else
MsgBox("Tokengenerierung nicht erfolgreich." & vbCrLf & "In 5 Sekunden nochmal versuchen!")
Dim jetzt As DateTime = DateTime.UtcNow
Dim wenn As DateTime = DateTime.UtcNow.AddMinutes(-3)
Token_tmr.Interval = 3000
Token_tmr.Enabled = True
If jetzt < DateTime.UtcNow.AddSeconds(-5) Then
Return "NotYet"
Else
Token_tmr.Enabled = False
token = Convert.ToBase64String(time.Concat(Key).ToArray())
Return token
End If
@@ -189,8 +188,9 @@ Partial Class login_ForgotPW
Dim data() As Byte = Convert.FromBase64String(tokenname)
Dim wenn As DateTime = DateTime.FromBinary(BitConverter.ToInt64(data, 0))
If wenn < DateTime.UtcNow.AddMinutes(-30) Then
Return False
tokenname = ""
MsgBox("Token nicht gefunden oder zu alt!" + Environment.NewLine + "Bitte erneut Mail senden!")
Return False
ElseIf tokenname = "NotYet" Then
Return False
Else

View File

@@ -63,92 +63,88 @@
}
</script>
</head>
<body onload="FocusOnInput()">
<%Dim veragregex = New RegexSammlung_VERAG()
Dim regexUID As String = veragregex.getregUID()
Dim regexPWVal As String = veragregex.getregPassword()%>
<body onload="FocusOnInput()">
<div id="content_container">
<div class="container-fluid">
<form id="form1" runat="server">
<asp:Login ID = "Login1" runat = "server" OnAuthenticate= "ValidateUser" ClientIDMode="AutoID" DestinationPageUrl="../Customers/CustomsAviso.aspx" >
<asp:Login ID = "Login1" runat = "server" OnAuthenticate= "ValidateUser" DestinationPageUrl="../Customers/CustomsAviso.aspx" >
<LayoutTemplate>
<center>
<table cellpadding="0" style="font-size:12px">
<!-- <tr style=" background-image: linear-gradient(to right, #003680 , #0055cc);color:#fff;height:30px;font-size:12px">
<td align="center" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">Bitte melden Sie sich an:</td>
</tr> -->
<tr style="color:#003680; height:40px;">
<td align="center" colspan="2" style="color:#003680;font-kerning:auto;font-weight:700;">
<asp:Label ID="lbl_login" runat="server" Text="Login" CssClass="txt_design" ></asp:Label></td>
<table id="tbl_main" cellpadding="0">
<tr style="color:#003680; height:30px;font-size:12px">
<td align="center" style="color:#fff;font-kerning:auto;">
<asp:Label ID="lbl_login" runat="server" style="color:#003680; font-size:20px;font-weight:700;" Text="Login"></asp:Label>
</td>
</tr>
<tr style="color:#003680; height:30px;">
<tr style="color:#003680; height:46px;">
<td align="left" colspan="2">
<asp:Label ID="CustomerIDLabel" runat="server" AssociatedControlID="CustomerID" CssClass="txt_design">Kundennummer:</asp:Label>
</td>
<td align="left" colspan="2">
<asp:TextBox ID="CustomerID" runat="server" required="true" ValidationGroup="txt_check"></asp:TextBox>
</td></tr>
<tr style="color:#003680; height:15px;">
<td align="right">
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="CustomerID" ToolTip="Die Kundennummer ist erforderlich." ValidationGroup="Login1">Die Kundennummer ist erforderlich.</asp:RequiredFieldValidator>
</td></tr>
<tr style="color:#003680; height:15px;">
<td align="right">
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="CustomerID" ValidationGroup="txt_check" runat="server" Display="Dynamic" SetFocusOnError="true" ValidationExpression="<%=regexUID %>"></asp:RegularExpressionValidator>
<td align="left">
<asp:TextBox ID="CustomerID" runat="server" required="true" Width = "240" ValidationGroup="txt_checkUID"></asp:TextBox>
</td>
</tr>
<tr style="color:#003680; height:30px;">
<tr style="color:#003680; height:46px;">
<td align="left" colspan="2">
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="CustomerID" ToolTip="Die Kundennummer ist erforderlich." ValidationGroup="txt_checkUID">Die Kundennummer ist erforderlich.</asp:RequiredFieldValidator>
</td><td>
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="CustomerID" ValidationGroup="txt_checkUID" runat="server" Display="Dynamic" SetFocusOnError="true" ValidationExpression="<%=regexUID %>"></asp:RegularExpressionValidator>
</td>
</tr>
<tr style="color:#003680; height:46px;">
<td align="left" colspan="2">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="txt_design">Benutzername:</asp:Label>
</td>
<td align="left" colspan="2">
<asp:TextBox ID="UserName" runat="server" TextMode="SingleLine" required="true"></asp:TextBox>
<asp:TextBox ID="UserName" runat="server" TextMode="SingleLine" Width = "240" ValidationGroup="txt_Username" required="true"></asp:TextBox>
</td>
</tr>
<tr style="color:#003680; height:20px;">
<td align="right">
<asp:RequiredFieldValidator ID="UserNamerequired" runat="server" ControlToValidate="UserName" ErrorMessage="Der Benutzername ist erforderlich." ToolTip="Der Benutzername ist erforderlich." ValidationGroup="Login1">Der Benutzername ist erforderlich.</asp:RequiredFieldValidator>
<tr style="color:#003680; height:23px;">
<td align="left" colspan="2">
<asp:RequiredFieldValidator ID="UserNamerequired" runat="server" ControlToValidate="UserName" ErrorMessage="Der Benutzername ist erforderlich." ToolTip="Der Benutzername ist erforderlich." ValidationGroup="txt_Username">Der Benutzername ist erforderlich.</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="color:#003680; height:30px;">
<tr style="color:#003680; height:46px;">
<td align="left" colspan="2">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="txt_design">Kennwort:</asp:Label>
</td>
<td align="left" colspan="2">
<asp:TextBox ID="Password" runat="server" TextMode="Password" required="true" ValidationGroup="Login2" MaxLength="30"></asp:TextBox>
</td></tr>
<tr style="color:#003680; height:20px;">
<td align="right">
<asp:RequiredFieldValidator ID="Passwordrequired" runat="server" ControlToValidate="Password" ErrorMessage="Das Kennwort ist erforderlich." ToolTip="Das Kennwort ist erforderlich." ValidationGroup="Login2">Bitte Passwort angeben.</asp:RequiredFieldValidator>
<asp:TextBox ID="Password" runat="server" TextMode="Password" required="true" Width = "240" ValidationGroup="chk_PWField" MaxLength="30"></asp:TextBox>
</td>
</tr>
<tr style="color:#003680; height:30px;">
<td>
<tr style="color:#003680; height:46px;">
<td align="left" colspan="2">
<asp:RequiredFieldValidator ID="Passwordrequired" runat="server" ControlToValidate="Password" ErrorMessage="Das Kennwort ist erforderlich." ToolTip="Das Kennwort ist erforderlich." ValidationGroup="chk_PWField">Bitte Passwort angeben.</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="checkpwdREGEX" ControlToValidate="Password" ValidationGroup="chk_PWField" runat="server" Display="Dynamic" SetFocusOnError="true" ValidationExpression="<%=regexPWVal %>"></asp:RegularExpressionValidator>
</td>
</tr>
<tr style="color:#003680; height:23px;">
<td align="left" colspan="2">
<asp:CheckBox ID="RememberMe" runat="server" Text="Anmeldedaten speichern." />
</td>
</tr>
<tr style="color:#003680; height:fit-content;">
<td align="center" colspan="2" style="color:Red;">
<tr style="color:#003680; height:23px">
<td align="center" style="color:Red;" colspan="2">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr style="color:#003680; height:20px;">
<tr style="color:#003680; height:23px;">
<td align="left" colspan="2">
<br/> <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Login" ValidationGroup="Login1" target="_top" OnClientClick="bust2()"/>
</td>
<tr style="color:#003680; height:20px;">
<td align="middle" colspan="2">
<td align="right" colspan="2">
<asp:LinkButton ID="LinkButton1" runat="server" target="_top" OnClientClick="bust2()">Admin-Login</asp:LinkButton>
</td>
</tr>
<tr style="color:#003680; height:50px;">
<td align="left" colspan="2">
<tr style="color:#003680; height:23px;">
<td align="left" colspan="4">
<%Dim url As String = Session.Keys.Item("urltochangepw") %>
<a ID="LinkButton2" runat="server" target="_top" href="ForgotPW.aspx?urlofchangepwpage=<%=url%>">Passwort Vergessen</a>
</td>
</td>
</tr>
</table>
</center>

View File

@@ -5,10 +5,7 @@ Partial Class login_login_TEST
Inherits System.Web.UI.Page
Dim CustomerIDTextBox As TextBox
Protected Sub Page_Load(sender As Object, e As EventArgs)
If Not IsPostBack Then
Dim varlink As String = Request.Url.ToString
Response.Redirect(varlink, False)
End If
End Sub
Protected Sub ValidateUser(sender As Object, e As EventArgs)
Dim userId As Integer = 0