<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Import Namespace="Hishop.SystemServices" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="PageTitleArea">
            <div class="PageTitle">
                <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:AddManager,IDS_PageTitle %>"></asp:Literal>
            </div>
            <div style="width: 80%;">
                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:AddManager,IDS_PageDesc %>" />
            </div>
        </div>
        <Hishop:AddManager ID="AddManager1" runat="server">
            <SkinTemplate>
                        <Hishop:StatusMessage ID="Status" runat="server" Visible="False" />
                        <Hishop:AddUserControl ID="userControl" runat="server">
                            <SkinTemplate>
<table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
    <tr>
        <td class="leftTD"><asp:Label ID="lblUsername" runat="server" Text="<%$ Resources:AddUserControl, IDS_FromField_lblUserName %>"></asp:Label>：</td>
        <td class="rightTD"><asp:TextBox ID="txtUserName" runat="server"></asp:TextBox></td>
        <td class="rightTD">
        <div id="txtUserNameTip" runat="server"></div>
        <Hishop:ValidateTarget ID="validateTargetUserName" ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtUserName" Description="<%$ Resources:AddUserControl, IDS_Message_UserName_Description %>">
                <Validators>
                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:AddUserControl, IDS_ErrorMessage_UserName_ErrorMessage %>" LowerBound="3" UpperBound="20" />
                </Validators>
            </Hishop:ValidateTarget> 
        </td>
    
    </tr>
    <tr>
        <td class="leftTD"><asp:Label ID="lblPassword" runat="server" Text="<%$ Resources:AddUserControl, IDS_FromField_lblPassword %>"></asp:Label>：</td>
        <td class="rightTD"><asp:TextBox ID="txtPassword" runat="server" TextMode="Password" onpaste="return false"></asp:TextBox></td>
        <td class="rightTD">
          <div id="txtPasswordTip" runat="server"></div>
          <Hishop:ValidateTarget ID="validateTargetPassword"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtPassword"  Description="<%$ Resources:AddUserControl, IDS_Message_Password_Description %>" Nullable="false" FocusMessage="<%$ Resources:AddUserControl, IDS_Message_Password_FocusMessage %>"  >
                <Validators>
                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:AddUserControl, IDS_ErrorMessage_Password_ErrorMessage %>" LowerBound="6" UpperBound="20" />
                </Validators>
           </Hishop:ValidateTarget>
        </td>                
    </tr>
    <tr>
        <td class="leftTD"><asp:Label ID="lblPasswordagain" runat="server" Text="<%$ Resources:AddUserControl, IDS_FromField_lblPasswordAgain %>"></asp:Label>：</td>
        <td class="rightTD"><asp:TextBox ID="txtPasswordagain" runat="server" TextMode="Password" onpaste="return false"></asp:TextBox> </td>
        <td class="rightTD">
                <div id="txtPasswordagainTip" runat="server"></div>
                        <Hishop:ValidateTarget ID="ValidateTargetPasswordagain" ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtPasswordagain"  Description="<%$ Resources:AddUserControl, IDS_Message_PasswordAgain_Description %>" Nullable="false" FocusMessage="<%$ Resources:AddUserControl, IDS_Message_PasswordAgain_Description %>" >
                            <Validators>
                                  <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:AddUserControl, IDS_ErrorMessage_PasswordAgain_ErrorMessage %>" LowerBound="6" UpperBound="20"/>
                                <Hishop:CompareClientValidator DestinationId="txtPassword" ErrorMessage="<%$ Resources:AddUserControl, IDS_ErrorMessage_PasswordAgain_ErrorMessage %>" />
                            </Validators>
                        </Hishop:ValidateTarget>        
        </td>
    </tr>
    <tr>
        <td class="leftTD"><asp:Label ID="lblEmail" runat="server"  Text="<%$ Resources:AddUserControl, IDS_FromField_lblEmail %>"></asp:Label>：</td>
        <td class="rightTD"><Hishop:DefaultButtonTextBox ID="txtEmail" runat="server"  Button="btnCreate"></Hishop:DefaultButtonTextBox> </td>
        <td class="rightTD">
          <div id="txtEmailTip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidateTargetEmail" runat="server" ContainerId="ValidatorContainer" ControlToValidate="txtEmail"
                    Description="<%$ Resources:AddUserControl,IDS_Message_Email_Description %>" 
                    Nullable="false" 
                    FocusMessage="<%$ Resources:AddUserControl,IDS_Message_Email_FocusMessage %>">
                <Validators>
                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:AddUserControl,IDS_ErrorMessage_Email_ErrorMessage %>" Regex="([a-zA-Z\\.0-9_-])+@([a-zA-Z0-9_-])+((\\.[a-zA-Z0-9_-]{2,3}){1,2})" LowerBound="1" UpperBound="200" />
                </Validators>
           </Hishop:ValidateTarget>         
        </td>
    </tr>
</table>
                            </SkinTemplate>
                        </Hishop:AddUserControl>
                        <table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
                            <tr>
                                <!--用户组-->
                                <td class="leftTD">
                                    <asp:Literal ID="lblAgent" runat="server" Text="<%$ Resources:AddManager,IDS_FromField_lblRole %>"></asp:Literal>：
                                </td>
                                <td class="rightTD" style="width: 26%">
                                    <Hishop:RoleDropDownList ID="dropRole" runat="server" AllowNull="false" />
                                </td>
                                <td class="rightTD">
                                    <div id="dropRoleTip" runat="server">
                                    </div>
                                    <Hishop:ValidateTarget ID="validateTargetdropRole" runat="server" ContainerId="ValidatorContainer"
                                        ControlToValidate="dropRole" Description="<%$ Resources:AddManager,IDS_Message_Role_Select %>">
                                        <Validators>
                                            <Hishop:DropDownListClientValidator ErrorMessage="<%$ Resources:AddManager,IDS_ErrorMessage_Role %>" />
                                        </Validators>
                                    </Hishop:ValidateTarget>
                                </td>
                                <!--结束 -->
                            </tr>
                            <tr>
                                <td class="bottonLeftTD">
                                    &nbsp;
                                </td>
                                <td colspan="2" class="rightTD">
                                    <table>
                                        <tr>
                                            <td valign="top">
                                                <asp:Button ID="btnCreate" OnClientClick="return PageIsValid();" runat="server" Text="<%$ Resources:Resources, IDS_Button_Confirm %>"
                                                    CssClass="inp_L1" />
                                            </td>
                                            <td>
                                                <div class="return_inp">
                                                    <a href='<%= Globals.GetSiteUrls().UrlData.FormatUrl("admin_Managers")%>'>
                                                        <asp:Literal ID="lblreturn" runat="server" Text="<%$ Resources:AddManager,IDS_Button_ToManager %>" /></a>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td class="rightTD">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
            </SkinTemplate>
        </Hishop:AddManager>
    </div>
    <br />
    <div style="margin:0px auto;width:500px;">
        <hr style="width: 500px;" />
        <Hishop:SiteCopyright ID="SiteCopyright1" runat="server" />
    </div>
    <br />
    <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
    </form>
</body>
</html>
