<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResetPassword.aspx.cs" Inherits="eDocument.Server.Administrator.User.ResetPassword" MasterPageFile="~/Site.Master" %>

<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">
    <div class="row">
    <div class="col-12 col-lg-6 offset-lg-3">
    <h1 class="skjema-admin__page-title skjema-admin__text-center d-block">
        Nullstill passord
    </h1>

        <asp:Panel runat="server" ID="pnlInput">

    
                    <div class="skjema-admin__mb-20">
                        <label class="skjema-admin__page__label">
                            Passord
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPassword" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
                        </label>

                        <asp:TextBox 
                            ID="txtPassword" 
                            CssClass="skjema-admin__form__input mb-2"
                            TextMode="Password"
                            runat="server" 
                            MaxLength="300">
                        </asp:TextBox>

                        <p>
                            Må inneholde minst seks tegn - og minst én stor bokstav, minst én liten bokstav og ett tall eller spesialtegn.
                        </p>

                        <asp:RegularExpressionValidator runat="server" ControlToValidate="txtPassword" Display="Dynamic" ForeColor="Red" ValidationExpression="(?=^.{6,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$">Minst seks tegn, hvorav minst 1 stor bokstav, minst 1 liten bokstav og minst 1 tall/spesialtegn</asp:RegularExpressionValidator>
                    </div>

                    <div class="skjema-admin__mb-20">

                        <label class="skjema-admin__page__label">
                            Gjenta passord
                        </label>

                        <asp:TextBox 
                            ID="txtPasswordRepeat"
                            CssClass="skjema-admin__form__input mb-2"
                            TextMode="Password" 
                            runat="server" 
                            MaxLength="300">
                        </asp:TextBox>

                        <asp:CompareValidator runat="server" ControlToValidate="txtPasswordRepeat" ControlToCompare="txtPassword" Operator="Equal" Type="String" ErrorMessage="Passordene er ikke like." ForeColor="Red" /><br />
                        <asp:Label runat="server" ID="lblPasswordError" ForeColor="Red"></asp:Label>
                </div>    
        

           <%-- Nytt passord - minst seks tegn, hvorav minst 1 stor bokstav, minst 1 liten bokstav og minst 1 tall/spesialtegn:<br />
            <asp:TextBox TextMode="Password" runat="server" ID="txtNewPassword"></asp:TextBox>
            <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNewPassword" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator runat="server" ControlToValidate="txtNewPassword" Display="Dynamic" ForeColor="Red" ValidationExpression="(?=^.{6,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$">Minst seks tegn, hvorav minst 1 stor bokstav, minst 1 liten bokstav og minst 1 tall/spesialtegn</asp:RegularExpressionValidator>
            <br />
            <br />
            <br />
    --%>
    
            <asp:Button 
                ID="btnReset" 
                CssClass="skjema-admin__button skjema-admin__button--primary mb-5"
                runat="server" 
                Text="Nullstill passord" 
                OnClick="btnReset_OnClick">
            </asp:Button>
        
    </asp:Panel>

        <asp:Label runat="server" ID="lblMessage" ForeColor="Red"></asp:Label><br />
        <asp:Label runat="server" ID="lblOk" ForeColor="Green"></asp:Label>&nbsp;
        <br/>
        <asp:HyperLink runat="server" NavigateUrl="~/Index2.aspx" Visible="False" ID="lnkToLogin">Til innlogging</asp:HyperLink>
    <%--</p>--%>
    </div>
    </div>
</asp:Content>
