<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserSettings.ascx.cs" Inherits="Zap.BI.Portal.Controls.Settings.UserSettings" %>

<fieldset runat="server" id="ProfileFieldSet" visible="true" style="width: 640px" class="ui-fieldset">
    <legend><asp:Label ID="Label1" runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ActiveProfile %>" /></legend>
    <table>
        <tr runat="server" id="SetProfileRow">
            <td style="width: 520px;">
                <asp:Label runat="server" ID="SelectedProfileLabel" class="ui-form-label" />
            </td>
            <td style="width: 200px;">
                <asp:Button runat="server" ID="SetProfile" CssClass="button" Text="<%$ Resources: Controls.Settings.SettingsText, Button_Change %>" OnClick="SetProfile_Click" />
            </td>
        </tr>
    </table>
</fieldset>
<fieldset runat="server" id="OrganizationFieldSet" visible="false" style="width: 640px" class="ui-fieldset">
    <legend><asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ActiveOrganization %>" /></legend>
    <asp:DropDownList runat="server" ID="OrganizationDropDownList" Width="600" DataTextField="LocalizedName" DataValueField="Id" AutoPostBack="true" OnSelectedIndexChanged="OrganizationDropDownList_SelectedIndexChanged" CssClass="ui-input-box" />
</fieldset>
<zapWeb:ZapUpdatePanel runat="server" ID="ProfileOptionsUpdatePanel">
    <ContentTemplate>
        <fieldset style="width: 640px;" class="ui-fieldset">
            <legend>
                <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ProfileManagement %>" />
            </legend>
            <%--Area in which changes to inputs should register unsaved changes client side--%>
            <div class="unsavedChangesInputs">
                <table>
                <tr>
                    <td style="width: 150px;">
                        <asp:Label runat="server" ID="SetHomepageLabel" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_Homepage %>" ToolTip="<%$ Resources: Controls.Settings.SettingsText, ToolTip_HomePage %>" />
                    </td>
                    <td style="width: 300px;">
                        <asp:Label runat="server" ID="SelectedHomepageLabel" CssClass="ui-text" />
                    </td>
                    <td style="width: 200px;">
                        <asp:Button runat="server" ID="SetHomepageButton" CssClass="button" Text="<%$ Resources: Controls.Settings.SettingsText, Button_Change %>" OnClick="SetHomepageButton_Click" ToolTip="<%$ Resources: Controls.Settings.SettingsText, ToolTip_ChangeHomePage %>"/>
                        <asp:Button runat="server" ID="ClearHomepageButton" CssClass="button" Text="<%$ Resources: Controls.Settings.SettingsText, Button_Clear %>" OnClick="ClearHomepageButton_Click" ToolTip="<%$ Resources: Controls.Settings.SettingsText, ToolTip_ClearHomePage %>" />
                    </td>
                </tr>
                <tr runat="server" id="ViewPersonalFoldersRow" title="<%$ Resources: Controls.Settings.SettingsText, Tooltip_ShowPersonalFolders %>">
                    <td><asp:Label runat="server" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ViewPersonalFolders %>" /></td>
                    <td><asp:DropDownList runat="server" ID="ViewPersonalFoldersDropDownList" Width="250" AutoPostBack="true" OnSelectedIndexChanged="ViewPersonalFoldersDropDownList_SelectedIndexChanged" CssClass="ui-input-box" style="padding:0px;" /></td>
                </tr>
                <tr runat="server" title="<%$ Resources: Controls.Settings.SettingsText, Tooltip_ContentCulture %>">
                    <td><asp:Label runat="server" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ContentCulture %>" /></td>
                    <td><asp:DropDownList ID="ContentCulture" runat="server" Width="250" AutoPostBack="true" OnSelectedIndexChanged="ContentCulture_SelectedIndexChanged" CssClass="ui-input-box" style="padding:0px;" /></td>
                </tr>
                <tr runat="server" title="<%$ Resources: Controls.Settings.SettingsText, Tooltip_FormattingCulture %>">
                    <td><asp:Label runat="server" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_FormattingCulture %>" /></td>
                    <td><asp:DropDownList ID="FormattingCulture" runat="server" Width="250" AutoPostBack="true" OnSelectedIndexChanged="FormattingCulture_SelectedIndexChanged" CssClass="ui-input-box" style="padding:0px;" /></td>
                </tr>
                <tr>
                    <td><asp:Label runat="server" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_EmailAddress %>" /></td>
                    <td><asp:TextBox ID="EmailAddressTextBox" runat="server" Width="250" ValidationGroup="EmailAddress" AutoPostBack="false" OnTextChanged="EmailAddressTextBox_TextChanged" CssClass="ui-input-box" /></td>
                    <td><asp:RegularExpressionValidator ID="EmailAddressTextBoxValidator" runat="server" ControlToValidate="EmailAddressTextBox" Display="Dynamic" EnableClientScript="true" CssClass="ErrorLabel ui-text" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+" ValidationGroup="EmailAddress" Text="<%$ Resources: Controls.Settings.SettingsText, Label_InvalidEmailAddress %>" /></td>
                </tr>
                <tr runat="server" title="<%$ Resources: Controls.Settings.SettingsText, Tooltip_DateOverride %>">
                    <td><asp:Label runat="server" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_CurrentDateOverride %>" /></td>
                    <td><dxe:ASPxDateEdit ID="CurrentDateOverride" Width="250" AutoPostBack="true" OnDateChanged="CurrentDateOverride_DateChanged" runat="server" CssClass="ui-input-box" style="padding:0px;" DropDownButton-Image-SpriteProperties-CssClass="working-date-dropdown-icon" /></td>
                </tr>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="ResetProfileLabel" CssClass="headingText ui-form-label" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ResetProfile %>" ToolTip="<%$ Resources: Controls.Settings.SettingsText, ToolTip_ResetProfile %>" />
                    </td>
                    <td>
                    </td>
                    <td>
                        <asp:Button runat="server" ID="Reset" CssClass="button" Text="<%$ Resources: Controls.Settings.SettingsText, Button_Reset %>" OnClick="Reset_Click" ToolTip="<%$ Resources: Controls.Settings.SettingsText, ToolTip_ResetProfile %>" />
                    </td>
                </tr>
            </table>
            </div>
        </fieldset>
    </ContentTemplate>
</zapWeb:ZapUpdatePanel>
