<%@ Page Title="" Language="C#" AutoEventWireup="false" MasterPageFile="~/EmptyAjaxMaster.Master"
    CodeBehind="AddEditUserPage.aspx.cs" Inherits="MKinsight.Online.UIServices.AddEditUserPage" %>

<%@ Register Src="../UIControls/ActiveDirectory/ActiveDirectoryCheck.ascx" TagName="ActiveDirectoryCheck"
    TagPrefix="uc6" %>

<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/PopupsHandler.ascx" TagName="PopupsHandler" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/PopupPanel.ascx" TagName="PopupPanel" TagPrefix="uc5" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

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

    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>
    <script type="text/javascript" src="../scripts/jquery/jquery.box-min.js"></script>
    <script type="text/javascript">

        function cb() {
            parent.$.colorbox.close();
            window.parent.location.href = window.parent.location.href;
        }

        function cb2() {
            parent.$.colorbox.close();

        }

    </script>

    <link rel="stylesheet" type="text/css" href="../scripts/jquery/jqbox.css" />

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

    <asp:UpdatePanel ID="ptr" runat="server">
        <ContentTemplate>
            <div>
                <uc1:MessageBox ID="u_M" runat="server" />
            </div>
            <asp:Panel ID="tbM" runat="server" CssClass="w-bar">

                <asp:LinkButton runat="server" ID="tbl_Details" CssClass="w-button" Style="background: url(../images/detail32.png);">
                    <asp:Label ID="tbl_DetailsLable" runat="server"></asp:Label>
                </asp:LinkButton>

                <asp:LinkButton runat="server" ID="tbl_Permission" CssClass="w-button" Style="background: url(../images/config32.png);">
                    <asp:Label ID="tbl_PermissionLabel" runat="server"></asp:Label>
                </asp:LinkButton>

                <asp:LinkButton runat="server" ID="tbl_Role" CssClass="w-button" Style="background: url(../images/role32.png);">
                    <asp:Label ID="tbl_RoleLabel" runat="server"></asp:Label>
                </asp:LinkButton>

            </asp:Panel>

            <asp:MultiView ID="mv_R" runat="server">
                <asp:View ID="v_RD" runat="server">

                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="lbl_Type" runat="server"></asp:Label>
                            </td>
                            <td>
                                <asp:RadioButtonList ID="rbl_Types" runat="server" AutoPostBack="true">
                                </asp:RadioButtonList>
                                <asp:Panel ID="pn_Features" runat="server" Visible="false">

                                    <div>
                                        <asp:CheckBox ID="chk_ExtFeatureActTrack" runat="server" />
                                    </div>
                                    <div>
                                        <asp:CheckBox ID="chk_ExtFeatureAuditRpt" runat="server" />
                                    </div>
                                    <div>
                                        <asp:CheckBox ID="chk_ExtFeatureTimeRec" runat="server" />
                                    </div>
                                    <div>
                                        <asp:CheckBox ID="chk_ExtFeatureControlsMgmt" runat="server" />
                                    </div>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Panel ID="pnl_Login" runat="server">
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Label ID="lbl_UserName" runat="server"></asp:Label>
                                                <asp:Label ID="mU" runat="server" CssClass="mandatory">*</asp:Label>
                                            </td>


                                            <td class="amend_field">
                                                <div>
                                                    <asp:LinkButton ID="lnk_AD" runat="server"
                                                        OnClientClick="$.colorbox({ transition: 'none', width: '95%', height: '95%', iframe: true,href:'ADImportPage.aspx?type=false' }); return false;"></asp:LinkButton>
                                                </div>
                                                <asp:TextBox ID="txt_UName" runat="server" CssClass="amend" MaxLength="128"
                                                    ></asp:TextBox>
                                                <p>
                                                    <asp:Label ID="lbl_UserNameValue" runat="server"></asp:Label></p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="vertical-align:top;">
                                                <asp:Label ID="lbl_AuthenticationTypeLabel" runat="server"></asp:Label>
                                            </td>
                                            <td class="amend_field" style="vertical-align:top;">
                                                
                                                    <asp:Label ID="lbl_AuthenticationType" runat="server"></asp:Label>
                                                <div>
                                                    <asp:Label ID="lbl_OAuthUnlinkedAccount" runat="server" ForeColor="Red"></asp:Label>
                                                </div>


                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="lbl_Pass" runat="server"></asp:Label>
                                                <asp:Label ID="mP" runat="server" CssClass="mandatory">*</asp:Label>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Pass" runat="server" CssClass="amend" MaxLength="128"
                                                    TextMode="Password" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="lbl_CPass" runat="server"></asp:Label>
                                                <asp:Label ID="mCP" runat="server" CssClass="mandatory">*</asp:Label>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_CPass" runat="server" CssClass="amend" MaxLength="128"
                                                    TextMode="Password" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td class="amend_field">
                                                <asp:Button ID="btn_ResetPass" runat="server" Text="Reset Password" OnClientClick="$.colorbox({ transition: 'none', width: '95%', height: '95%', iframe: true,href:'ResetPasswordPage.aspx' }); return false;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>
                                                <asp:CheckBox ID="mki_SendNotification" runat="server" Checked="True" Visible="false" />
                                                <asp:Button ID="btn_SendNotification" runat="server" Text="Send Notification" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>
                                                <asp:CheckBox ID="mki_MakeContact" runat="server" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td></td>
                                            <td>
                                                <asp:CheckBox ID="mki_PasswordNeverExpires" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>
                                                <asp:CheckBox ID="mki_DualAuthNotRequired" runat="server" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td class="left" colspan="2" style="vertical-align: top;"></td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Panel ID="pnl_Details" runat="server">
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Title" runat="server" Text="Title:"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Title" runat="server" CssClass="amend" MaxLength="128" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_FName" runat="server" Text="First Name:"></asp:Literal>
                                                <asp:Label ID="mF" runat="server" CssClass="mandatory">*</asp:Label>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_FName" runat="server" CssClass="amend" MaxLength="128" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_SName" runat="server" Text="Surname:"></asp:Literal>
                                                <asp:Label ID="mS" runat="server" CssClass="mandatory">*</asp:Label>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_SName" runat="server" CssClass="amend" MaxLength="128" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Ref" runat="server" Text="Ref:"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Ref" runat="server" CssClass="amend" MaxLength="64" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Email" runat="server" Text="Email:"></asp:Literal>
                                                <asp:Label ID="mE" runat="server" CssClass="mandatory">*</asp:Label>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Email" runat="server" CssClass="amend" MaxLength="255" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Tel" runat="server" Text="Tel:"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Tel" runat="server" CssClass="amend" Width="300px" MaxLength="128"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Mobile" runat="server" Text="Mobile"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Mobile" runat="server" CssClass="amend" MaxLength="128" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Fax" runat="server" Text="Fax:"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Fax" runat="server" CssClass="amend" MaxLength="128" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Postions" runat="server" Text="Postions"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Postions" runat="server" CssClass="amend" MaxLength="128" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Address" runat="server" Text="Address:"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Address" runat="server" CssClass="amend" TextMode="MultiLine" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="lit_Notes" runat="server" Text="Notes:"></asp:Literal>
                                            </td>
                                            <td class="amend_field">
                                                <asp:TextBox ID="txt_Notes" runat="server" CssClass="amend" TextMode="MultiLine" Width="300px"></asp:TextBox>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td colspan="2">
                                                <hr class="ee" />
                                                <asp:HiddenField ID="hdID" runat="server" />
                                            </td>
                                        </tr>

                                    </table>
                                </asp:Panel>

                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Panel ID="pnl_LangInfo" runat="server">
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Panel ID="pn_Lang" runat="server" CssClass="editor">
                                                    <div>
                                                        <asp:DropDownList ID="drp_Language" runat="server" DataTextField="DisplayName" DataValueField="Name"></asp:DropDownList>
                                                    </div>


                                                </asp:Panel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Panel ID="pn_DictionaryGroup" runat="server" CssClass="editor">
                                                    <div>
                                                        <asp:DropDownList ID="drp_DictionaryGroup" runat="server">
                                                        </asp:DropDownList>
                                                    </div>
                                                </asp:Panel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <uc2:PopupsHandler ID="ph_Region" runat="server" />
                                            </td>
                                        </tr>

                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>

                                <asp:Button ID="btn_Update" runat="server" Text="Update" Font-Bold="true" />

                                <asp:Button ID="btn_Add" runat="server" Text="Add" Font-Bold="true" />
                                <asp:Button ID="btn_Close" runat="server" OnClientClick="cb();return false;" />
                                <span class="tab">
                                    <asp:Button ID="btn_Lock" runat="server" ForeColor="Red" Text="Lock" />
                                    <asp:Button ID="btn_Unlock" runat="server" ForeColor="Red" Text="Unlock" />
                                    &nbsp;</span><asp:Button ID="btn_Archive" runat="server" Text="Archive" ForeColor="Red" />

                                <uc6:ActiveDirectoryCheck ID="usc_ADCheck" runat="server" />
                                <asp:HiddenField ID="hd_adUser" runat="server" />
                            </td>
                        </tr>
                    </table>
                </asp:View>
                <asp:View ID="v_RP" runat="server">
                    <table class="style1" id="tb_RiskPer" runat="server" visible="false">

                        <tr>
                            <td colspan="2">
                                <hr class="ee" />
                                <asp:Button ID="btn_Add4" runat="server" Text="Add" Font-Bold="true" />
                                <asp:Button ID="btn_Update4" runat="server" Text="Update" Font-Bold="true" />

                            </td>
                        </tr>

                        <tr>
                            <td colspan="2">&#160;&#160;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="lit_CreateRisk" runat="server" Text="CreateRisk"></asp:Literal>
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="RiskCreate" runat="server" CssClass="amend" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="lit_LAmendRisk" runat="server" Text="Amend Risk" />
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="RiskAmend" runat="server" CssClass="amend" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="lit_LDeleteRisk" runat="server" Text="Delete Risk" />
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="RiskDelete" runat="server" CssClass="amend" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="lit_Archive" runat="server" Text="Archive Risk" />
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="ArchiveRisk" runat="server" CssClass="amend" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="lit_LApproveRisk" runat="server" Text="Approve Risk" />
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="RiskApproval" runat="server" CssClass="amend" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="lit_LAssessRisk" runat="server" Text="Assess Risk" />
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="RiskAssessment" runat="server" />
                                <asp:DropDownList ID="drp_RiskAssessDSA" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <hr class="ee" />
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td colspan="2">
                                <asp:Table ID="tb_P" runat="server">
                                </asp:Table>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="2">
                                <hr class="ee" />
                                <asp:Button ID="btn_Add2" runat="server" Text="Add" Font-Bold="true" />
                                <asp:Button ID="btn_Update2" runat="server" Text="Update" Font-Bold="true" />
                                <asp:Button ID="btn_Close2" runat="server" OnClientClick="cb();return false;" />
                            </td>
                        </tr>
                    </table>
                </asp:View>

                <asp:View ID="v_UR" runat="server">
                    <table>

                        <tr>

                            <td>
                                <asp:CheckBoxList ID="ch_Roles" runat="server"></asp:CheckBoxList>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <hr class="ee" />
                                <asp:Button ID="btn_Add3" runat="server" Text="Add" Font-Bold="true" />
                                <asp:Button ID="btn_Update3" runat="server" Text="Update" Font-Bold="true" />
                                <asp:Button ID="btn_Close3" runat="server" OnClientClick="cb();return false;" />
                            </td>
                        </tr>

                    </table>


                </asp:View>
            </asp:MultiView>

            <asp:Button ID="btn_pHandler" runat="server" Text="Button" Style="display: none;" />
            <asp:Panel ID="P" runat="server" CssClass="frame" Style="display: none;">
                <div class="overlay">
                    <div style="float: right; margin-top: -28px; margin-right: -10px;">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="~/images/jq/close.png" runat="server" />
                    </div>
                    <div class="floatright">
                        <asp:Button ID="btn_TopOK" runat="server" OnClick="OnOK" />
                    </div>
                    <uc5:PopupPanel ID="usc_PP" runat="server" />
                    <div class="divpok">
                        <asp:Button ID="btn_POK" runat="server" />
                    </div>
                </div>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mdp" runat="server" TargetControlID="btn_pHandler" PopupControlID="P"
                BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <cc1:DragPanelExtender ID="dpE" runat="server" DragHandleID="pnlHeader" TargetControlID="p" />

        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="prz" runat="server" AssociatedUpdatePanelID="ptr" DisplayAfter="100">
        <ProgressTemplate>
            <div class="UpdateProgressBackground">
                <center>
                    <div class="UpdateProgressContent">
                        <h3>
                            <asp:Label ID="lbl_Wait" runat="server"></asp:Label></h3>
                        <br />
                        <img src="../images/ajax.gif" alt="" />
                    </div>
                </center>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

    <style>
        .editor legend {
            font-weight: 400;
        }
    </style>
</asp:Content>
