<%@ Page Title="" Language="C#" MasterPageFile="~/master.Master" EnableViewState="false" AutoEventWireup="true" CodeBehind="passwordreset.aspx.cs" Inherits="MKInsight.Online.Login.pages.Passwordreset" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">

        document.onkeypress = keyPress;
        var count = 1;
        function keyPress() {
            if (window.event.keyCode == 13) {
                event.returnValue = false;
                event.cancel = true;
            }
        }

        function CheckPassword(formObj) {
            var contextArray = formObj.id;
            PageMethods.CheckStrength(formObj.value, OnComplete, OnError);
        }


        function OnError(error, userContext, methodName) {

        }

        function OnComplete(result, userContext, methodName) {

            var s = result.split(":");
            var el = document.getElementById('<%:lbl_I.ClientID%>')

            if (s[1] == "1") {
                el.style.backgroundColor = '#7FFF7F';
            }
            else {
                el.style.backgroundColor = '#ED9B8F';
            }
            //el.style.display = 'inline';
            el.innerHTML = s[0];

        }

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cm" runat="server">

    <div class="container-fluid">

        <div role="alert" id="dv_Alert" runat="server" style="margin-top: 5px;">
        </div>

        <div class="row" runat="server" id="dv_Main">
            <div class="absolutecenter">
                <div id="productlogo"></div>

                <div class="card">
                    <div class="card-header">
                       
                            <asp:Label ID="lbl_PasswordTitle" runat="server" CssClass="text-white"></asp:Label>
                        
                        <div style="float: right; font-size: 80%; position: relative; top: -10px"></div>
                    </div>

                    <div class="card-body">

                        <div style="margin-bottom: 25px" class="input-group">
                            <div class="input-group-prepend">
                                <asp:Label runat="server" ID="lbl_pass_pr" CssClass="input-group-text"></asp:Label>
                            </div>

                            <input id="txt_New1" runat="server" type="password" class="form-control" required="required" autocomplete="off" autofocus onkeyup="CheckPassword(this)" />
                            <asp:Label ID="lbl_I" runat="server" class="input-group-addon hidden-xs"></asp:Label>

                        </div>

                        <div class="input-group">
                            <div class="input-group-prepend">
                                <asp:Label runat="server" ID="lbl_new2_pr" CssClass="input-group-text"></asp:Label>
                            </div>
                            <input id="txt_New2" runat="server" type="password" class="form-control" required="required" autocomplete="off" />
                        </div>

                        <div style="margin-top: 10px" class="form-group">
                            <asp:LinkButton ID="btn_ResetPassword" runat="server" CssClass="btn btn-primary" Text="Next" OnClick="OnResetPassword" />
                            <asp:LinkButton ID="btn_Login" runat="server" CssClass="btn btn-default" Text="Login" PostBackUrl="../default.aspx" />
                        </div>

                    </div>
                </div>
            </div>

        </div>

    </div>

</asp:Content>
