<%@ Page Title="" Language="C#" MasterPageFile="~/masterpages/eLogin.master" AutoEventWireup="true"
    CodeBehind="UserQuestionAnswerSetup.aspx.cs" Inherits="WebSite.UserQuestionAnswerSetup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />

    <asp:UpdatePanel ID="updatePanelQuestionAnswers" runat="server" EnableViewState="True" UpdateMode="Conditional">
        <ContentTemplate>
            <div align="left">
                <div>
                    <asp:Label ID="labelQuestionnaireHeader" runat="server" Text="<%$ Resources: UsersManagement, QuestionnaireHeader %>"
                        Font-Bold="True" Font-Underline="True" Font-Size="16px" />
                </div>
                <div>
                    <asp:Label ID="labelErrorMessage" runat="server" ForeColor="Red" Visible="false" />
                </div>                
                <br/>
                <div>
                    <asp:Label ID="labelSecurityQuestionNotSetup" runat="server" ForeColor="Red" Visible="false" Text="<%$ Resources: UsersManagement, SecurityQuestionNotSetup %>" />
                </div>
                <br/>
                    <asp:Panel runat="server" ID="pnlQuestionGroups">
                        
                        <asp:Panel runat="server" ID="pnlQuestionGroup_1">
                            <table border="0px">
                                    <tr>
                                        <td>
                                             <asp:Label ID="labelQuestionGroup1" runat="server" Text="<%$ Resources: UsersManagement, SecurityQuestionLabelText %>"
                                                    Font-Bold="True"  />
                                             <b><span style="color: #ff0000">*</span></b>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="dropDownQuestionGroup_1" runat="server" AutoPostBack="false" RepeatDirection="Horizontal"
                                                RepeatLayout="Flow" EnableViewState="true" ValidationGroup="SecurityQuestionAnswerValidationGroup">
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="requiredFieldValidatorQuestionGroup_1" runat="server" ControlToValidate="dropDownQuestionGroup_1"
                                                ErrorMessage="<%$ Resources: UsersManagement, QuestionnaireRequiredErrorMessage %>"
                                                Display="Dynamic" ToolTip="<%$ Resources: UsersManagement, QuestionnaireRequiredTooltip %>"
                                                InitialValue="-1" ValidationGroup="SecurityQuestionAnswerValidationGroup" />
                                        </td>
                                    </tr>
                            
                                    <tr>
                                        <td>
                                             <asp:Label ID="labelAnswerGroup1" runat="server" Text="<%$ Resources: UsersManagement, YourAnswerLabelText %>"
                                                    Font-Bold="True"  />
                                             <b><span style="color: #ff0000">*</span></b>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="textAnswerGroup_1" runat="server" Width="370px" MaxLength="50" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="requiredFieldValidatorAnswerGroup_1" runat="server" ControlToValidate="textAnswerGroup_1"
                                                ErrorMessage="<%$ Resources: UsersManagement, QuestionnaireAnswerRequiredErrorMessage %>"
                                                Display="Dynamic" ValidationGroup="SecurityQuestionAnswerValidationGroup" />
                                        </td>

                                    </tr>
                            </table>
                        </asp:Panel>
                
                        <asp:Panel runat="server" ID="pnlQuestionGroup_2">
                            <table border="0px">
                                    <tr>
                                        <td>
                                             <asp:Label ID="labelQuestionGroup2" runat="server" Text="<%$ Resources: UsersManagement, SecurityQuestionLabelText %>"
                                                    Font-Bold="True"  />
                                             <b><span style="color: #ff0000">*</span></b>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="dropDownQuestionGroup_2" runat="server" AutoPostBack="false" RepeatDirection="Horizontal"
                                                RepeatLayout="Flow" EnableViewState="true" ValidationGroup="SecurityQuestionAnswerValidationGroup">
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="requiredFieldValidatorQuestionGroup_2" runat="server" ControlToValidate="dropDownQuestionGroup_2"
                                                ErrorMessage="<%$ Resources: UsersManagement, QuestionnaireRequiredErrorMessage %>"
                                                Display="Dynamic" ToolTip="<%$ Resources: UsersManagement, QuestionnaireRequiredTooltip %>"
                                                InitialValue="-1" ValidationGroup="SecurityQuestionAnswerValidationGroup" />
                                        </td>
                                    </tr>
                            
                                    <tr>
                                        <td>
                                             <asp:Label ID="labelAnswerGroup2" runat="server" Text="<%$ Resources: UsersManagement, YourAnswerLabelText %>"
                                                    Font-Bold="True"  />
                                             <b><span style="color: #ff0000">*</span></b>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="textAnswerGroup_2" runat="server" Width="370px" MaxLength="50" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="requiredFieldValidatorAnswerGroup_2" runat="server" ControlToValidate="textAnswerGroup_2"
                                                ErrorMessage="<%$ Resources: UsersManagement, QuestionnaireAnswerRequiredErrorMessage %>"
                                                Display="Dynamic" ValidationGroup="SecurityQuestionAnswerValidationGroup" />
                                        </td>

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

                        <asp:Panel runat="server" ID="pnlQuestionGroup_3">
                            <table border="0px">
                                    <tr>
                                        <td>
                                             <asp:Label ID="labelQuestionGroup3" runat="server" Text="<%$ Resources: UsersManagement, SecurityQuestionLabelText %>"
                                                    Font-Bold="True"  />
                                             <b><span style="color: #ff0000">*</span></b>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="dropDownQuestionGroup_3" runat="server" AutoPostBack="false" RepeatDirection="Horizontal"
                                                RepeatLayout="Flow" EnableViewState="true" ValidationGroup="SecurityQuestionAnswerValidationGroup">
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="requiredFieldValidatorQuestionGroup_3" runat="server" ControlToValidate="dropDownQuestionGroup_3"
                                                ErrorMessage="<%$ Resources: UsersManagement, QuestionnaireRequiredErrorMessage %>"
                                                Display="Dynamic" ToolTip="<%$ Resources: UsersManagement, QuestionnaireRequiredTooltip %>"
                                                InitialValue="-1" ValidationGroup="SecurityQuestionAnswerValidationGroup" />
                                        </td>
                                    </tr>
                            
                                    <tr>
                                        <td>
                                             <asp:Label ID="labelAnswerGroup3" runat="server" Text="<%$ Resources: UsersManagement, YourAnswerLabelText %>"
                                                    Font-Bold="True"  />
                                             <b><span style="color: #ff0000">*</span></b>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="textAnswerGroup_3" runat="server" Width="370px" MaxLength="50" TextMode="Password"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="requiredFieldValidatorAnswerGroup_3" runat="server" ControlToValidate="textAnswerGroup_3"
                                                ErrorMessage="<%$ Resources: UsersManagement, QuestionnaireAnswerRequiredErrorMessage %>"
                                                Display="Dynamic" ValidationGroup="SecurityQuestionAnswerValidationGroup" />
                                        </td>

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

                    </asp:Panel>
                
                    <asp:Panel runat="server" ID="pnlEmailSection">
                        
                            <br/>
                            <hr/>
                            <br/>

                            <div align="left">
                                <table border="0px">
                                        <tr>
                                            <td>
                                                <asp:Label ID = "lblEmail" runat = "server" Text = "<%$ Resources: UsersManagement, LabelUserEmail %>" 
                                                    Font-Bold="True" />
                                                <b><span style="color: #ff0000">*</span></b>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="m_txtEmail" runat="server" Width="200px" ></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="m_rfvEmailAddress" runat="server" 
                                                    ErrorMessage="<%$ Resources: UsersManagement, ErrorMessageEmailAddressIsRequired %>" 
                                                    Display="Dynamic"
                                                    ToolTip="<%$ Resources: UsersManagement, ToolTipEmailAddressIsRequired %>" 
                                                    ControlToValidate="m_txtEmail" 
                                                    ValidationGroup="SecurityQuestionAnswerValidationGroup"></asp:RequiredFieldValidator>                                                
                                                <asp:RegularExpressionValidator ID="m_regExValEmail" runat="server" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                    ControlToValidate="m_txtEmail"
                                                    Display="Dynamic" ErrorMessage="<%$ Resources: UsersManagement, ErrorMessageEmailNotInInvalidFormat %>" 
                                                    ToolTip="<%$ Resources: UsersManagement, ToolTipEmailNotInInvalidFormat %>"
                                                    ValidationGroup="SecurityQuestionAnswerValidationGroup"
                                                    />
                                            </td>
                                        </tr>
                            
                                        <tr>
                                            <td>
                                                <asp:Label ID = "lblConfirmEmail" runat = "server" Text = "<%$ Resources: UsersManagement, LabelUserConfirmEmail %>" 
                                                    Font-Bold="True" />
                                                <b><span style="color: #ff0000">*</span></b>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="m_txtConfirmEmail" runat="server" Width="200px" ></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="m_rfvConfirmEmailAddress" runat="server" 
                                                    Display="Dynamic"
                                                    ErrorMessage="<%$ Resources: UsersManagement, ErrorMessageEmailAddressIsRequired %>" ToolTip="<%$ Resources: UsersManagement, ToolTipEmailAddressIsRequired %>" 
                                                    ControlToValidate="m_txtConfirmEmail"
                                                    ValidationGroup="SecurityQuestionAnswerValidationGroup"></asp:RequiredFieldValidator>                                                
                                                <asp:RegularExpressionValidator ID="m_regExValConfirmEmail" runat="server" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                    ControlToValidate="m_txtConfirmEmail"
                                                    Display="Dynamic" ErrorMessage="<%$ Resources: UsersManagement, ErrorMessageEmailNotInInvalidFormat %>" 
                                                    ToolTip="<%$ Resources: UsersManagement, ToolTipEmailNotInInvalidFormat %>"
                                                    ValidationGroup="SecurityQuestionAnswerValidationGroup"
                                                    />     
                                                <asp:CompareValidator ID="m_compValRetypeEmail" runat="server" ControlToValidate="m_txtConfirmEmail"
                                                    Display="Dynamic"
                                                    ControlToCompare="m_txtEmail" 
                                                    ErrorMessage="<%$ Resources: UsersManagement, ErrorMessageBothEmailAddressFieldsMustMatch %>" 
                                                    ToolTip="<%$ Resources: UsersManagement, ToolTipBothEmailAddressFieldsMustMatch %>"
                                                    ValidationGroup="SecurityQuestionAnswerValidationGroup"
                                                    />                                                                                           
                                            </td>

                                        </tr>
                                </table>
                            </div>
                    </asp:Panel>
                
                    <br/>

                    <asp:Panel runat="server" ID="pnlQuestionGroup_Button">
                        <table border="0px">
                                <tr>
                                    <td align="right">
                                        <asp:Button ID="UpdateButton" runat="server" CommandName="QuestionAnswerSaveCommand"
                                            Text="<%$ Resources: UsersManagement, ButtonSaveTextQuestionAnswerSetup %>" ValidationGroup="SecurityQuestionAnswerValidationGroup" 
                                            OnClick="UpdateButton_Click" />
                                    </td>

                                    <td>
                                        <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="<%$ Resources: UsersManagement, ButtonCancelTextQuestionAnswerSetup %>" OnClick="CancelPushButton_Click" Visible="False" />
                                    </td>

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

            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
