<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="EditProfile.aspx.cs" Inherits="Private.EditProfile" Title="Edit profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <br />
    <br />
    <asp:Panel ID="pnlMain" runat="server" Visible="false" EnableViewState="false">
        <asp:Panel ID="pnlAdmin" runat="server" Visible="false" EnableViewState="false">
            <asp:Button ID="btnDeleteUser" runat="server" Text="Delete user" OnClick="btnDeleteUser_Click"
                OnClientClick="return confirm('Delete user?')" CausesValidation="false" EnableViewState="false" />
            &nbsp;&nbsp;
            <asp:Button ID="btnDeactivateUser" runat="server" Text="Deactivate user" OnClick="btnDeactivateUser_Click"
                OnClientClick="return confirm('Deactivate user?')" CausesValidation="false" EnableViewState="false" />
            <asp:Button ID="btnActivateUser" runat="server" Text="Activate user" OnClick="btnActivateUser_Click"
                OnClientClick="return confirm('Activate user?')" CausesValidation="false" EnableViewState="false" />
            <br />
            <br />
            User is currently
            <asp:Label ID="lbIsActive" runat="server" EnableViewState="false"></asp:Label>
            <br />
            <br />
            User roles:
            <asp:Panel ID="pnlRoles" runat="server" EnableViewState="false">
            </asp:Panel>
            <br />
            <asp:Button ID="btnSaveRoles" runat="server" Text="Save roles" OnClick="btnSaveRoles_Click"
                CausesValidation="false" EnableViewState="false" />
            <br />
            <asp:Label ID="lbUserStatus" runat="server" ForeColor="Red" Visible="false" EnableViewState="false"></asp:Label>
            <br />
            <br />
        </asp:Panel>
        Change profile information for user
        <asp:Label ID="lbUsername" runat="server" EnableViewState="false"></asp:Label>
        <br />
        <br />
        Current password (required for password change, e-mail and secret question change):
        <br />
        <asp:TextBox ID="txtCurrentPassword" runat="server" TextMode="Password" EnableViewState="false"></asp:TextBox>
        <br />
        <br />
        New password:
        <br />
        <asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" EnableViewState="false"></asp:TextBox>
        <asp:RegularExpressionValidator ID="revNewPassword" runat="server" ControlToValidate="txtNewPassword"
            EnableViewState="false">*</asp:RegularExpressionValidator>
        <br />
        Confirm password:
        <br />
        <asp:TextBox ID="txtNewPasswordConfirm" runat="server" TextMode="Password" EnableViewState="false"></asp:TextBox>
        <asp:RegularExpressionValidator ID="revNewPasswordConfirm" runat="server" ControlToValidate="txtNewPasswordConfirm"
            EnableViewState="false">*</asp:RegularExpressionValidator>
        <br />
        <br />
        E-mail:
        <br />
        <asp:TextBox ID="txtNewEmail" runat="server" EnableViewState="false"></asp:TextBox>
        <asp:RegularExpressionValidator ID="revNewEmail" runat="server" ControlToValidate="txtNewEmail"
            EnableViewState="false" ErrorMessage="Invalid e-mail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
        <br />
        <br />
        New secret question:
        <br />
        <asp:TextBox ID="txtNewSecretQuestion" runat="server" EnableViewState="false"></asp:TextBox>
        <br />
        New secret answer:
        <br />
        <asp:TextBox ID="txtNewSecretAnswer" runat="server" EnableViewState="false"></asp:TextBox>
        <br />
        <asp:Label ID="lbError" runat="server" Visible="false" ForeColor="Red" EnableViewState="false"></asp:Label>
        <asp:ValidationSummary ID="vs1" runat="server" EnableViewState="false" />
        <br />
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" EnableViewState="false" />
    </asp:Panel>
    <asp:Panel ID="pnlDenied" runat="server" EnableViewState="false">
        You are not authorized to view this page.
    </asp:Panel>
</asp:Content>
