<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Cybersecurity.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>CyberSecurity</title>
    <link href="Content/bootstrap.min.css" rel="stylesheet"/>
    <script src="Scripts/jquery-3.0.0.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div >
    
        <h2>Login Form</h2>
        <br />

        <div class="form-group">

            <div class="form-group row">

                <label for="txtEmail" class="col-sm-1 col-form-label">Email address:</label>

                <div class="col-sm-2">
                    <asp:TextBox ID="txtEmail" class="form-control" runat="server"></asp:TextBox>
                </div>

                <div class="col-sm-4">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmail"  ErrorMessage="Please Enter Your Email" 
                        Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                        ClientValidationFunction="changeColor" ForeColor="Red" Display="Dynamic"
                        ControlToValidate="txtEmail" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
                </div>
            </div>


            <div class="form-group row">

                <label for="txtPassword" class="col-sm-1 col-form-label">Password:</label>


                <div class="col-sm-2">
                    <asp:TextBox ID="txtPassword" class="form-control" TextMode="Password" runat="server"></asp:TextBox>
                </div>
                <div class="col-sm-4">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                        ControlToValidate="txtPassword"  ErrorMessage="Please Enter Your Password" ForeColor="Red"></asp:RequiredFieldValidator>
                 </div>
            </div>


            <div class="form-group row">
                <div class="col-sm-1 text-center">
                    <asp:Button ID="Button1" class="btn btn-primary" runat="server" Text="Log In" onclick="Button1_Click" />

                </div>
                
                <div class="col-sm-11">
                    <asp:Label ID="lblErrorMessage" runat="server" ForeColor="Red"></asp:Label>
                </div>
            </div>
            <br />


            <div class="form-group row">

                <label for="btnForgottenPassword" class="col-sm-1 col-form-label">Manage password:</label>

                <div class="col-sm-1">
                    <asp:Button ID="btnUpdatePassword" class="btn btn-info" runat="server" Text="Password update"  CausesValidation="False" OnClick="btnUpdatePassword_Click" />
                </div>

                <div class="col-sm-2"></div>
                    
                <div class="col-sm-1">
                    <asp:Button ID="btnForgottenPassword"  class="btn btn-warning" runat="server" Text="Password reset" onclick="btnForgottenPassword_Click" CausesValidation="False" />
                </div>
                
                    <label for="btnForgottenPassword" class="col-sm-6 col-form-label"><-- this also can be used as one time password</label>
                
            </div>
        </div>
    
    </div>
    </form>
</body>
</html>