<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Step6.ascx.cs" Inherits="bitrix_install_Step6" %>
<%@ Import Namespace="Bitrix.Installer" %>
<script type="text/javascript">
function Install_ValidatePassword(sender, args)
{
	args.IsValid = false;
	
	var s = args.Value;
	if (s == null)
	{
		args.IsValid = true;
		return;	
	}
	
	if (s.length < 7)
		return;
	
	if (s.replace(/[\w\d]/g, "").length < 1)
		return;
		
	args.IsValid = true;
}
</script>
<font class="title"><%= BXInstaller.GetMessage(this, "Head") %></font>
<p>
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tbody>
            <tr>
                <td width="100%" bgcolor="#d5e7f3">
                    <img width="1" height="1" border="0" src="images/1.gif" /></td>
            </tr>
        </tbody>
    </table>
</p>
<p>
<%@ Register Src="Summary.ascx" TagName="Summary" TagPrefix="bx" %>
<bx:Summary runat="Server" ID="Errors" />
</p>
<table border="0" cellspacing="1" cellpadding="2" width="100%">
    <tr>
        <td colspan="2" valign="center" align="center" nowrap class="tablehead5">
            <font class="tableheadtext"><b><%= BXInstaller.GetMessage(this, "TableHead.AdminParameters") %></b></font>
        </td>
    </tr>
    <tr>
        <td nowrap align="right" class="tablebody1" style="height: 28px">
            <font class="tablefieldtext"><%= BXInstaller.GetMessage(this, "Login") %>:</font>
        </td>
        <td class="tablebody3" style="height: 28px">admin</td>
    </tr>
    <tr>
        <td nowrap align="right" class="tablebody1">
            <font class="tablefieldtext"><span class="required">*</span><%= BXInstaller.GetMessage(this, "FirstName") %>:</font>
        </td>
        <td class="tablebody3">
        <% RequiredFieldValidator1.ErrorMessage = BXInstaller.GetMessage(this, "Error.FirstNameRequired"); %>
            <asp:TextBox ID="txtName" runat="server" Columns="30"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" Display="Dynamic"
                  >*</asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td nowrap align="right" class="tablebody1">
            <font class="tablefieldtext"><span class="required">*</span><%= BXInstaller.GetMessage(this, "LastName") %>:</font>
        </td>
        <td class="tablebody3">
        <% RequiredFieldValidator2.ErrorMessage = BXInstaller.GetMessage(this, "Error.LastNameRequired"); %>
            <asp:TextBox ID="txtSurname" runat="server" Columns="30"></asp:TextBox><asp:RequiredFieldValidator 
				ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtSurname" Display="Dynamic"
                >*</asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td nowrap align="right" class="tablebody1">
            <font class="tablefieldtext"><span class="required">*</span>E-Mail:</font>
        </td>
        <td class="tablebody3">
        <% RequiredFieldValidator3.ErrorMessage = BXInstaller.GetMessage(this, "Error.EmailRequired"); %>
        <% RegularExpressionValidator1.ErrorMessage = BXInstaller.GetMessage(this, "Error.InvalidEmail"); %>
            <asp:TextBox ID="txtEmail" runat="server" Columns="30"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmail" Display="Dynamic"
                    >*</asp:RequiredFieldValidator><asp:RegularExpressionValidator Display="Dynamic"
                    ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ValidationExpression="^\s*[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\s*$" >*</asp:RegularExpressionValidator></td>
    </tr>
    
    <tr>
        <td nowrap align="right" class="tablebody1">
            <font class="tablefieldtext"><span class="required">*</span><%= BXInstaller.GetMessage(this, "Password") %>:</font>
        </td>
        <td class="tablebody3">
            <font class="tablebodytext">
            <% RequiredFieldValidator5.ErrorMessage = BXInstaller.GetMessage(this, "Error.PasswordRequired"); %>
            <% CompareValidator2.ErrorMessage = BXInstaller.GetMessage(this, "Error.PasswordsDontMatch"); %>
            <% CustomValidator1.ErrorMessage = BXInstaller.GetMessage(this, "Error.InsecurePassword"); %>
            <asp:TextBox ID="txtPassword" runat="server" Columns="30" TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtPassword" Display="Dynamic"
                >*</asp:RequiredFieldValidator><asp:CompareValidator 
                ID="CompareValidator2" runat="server" ControlToCompare="txtPassword" ControlToValidate="txtPassword2" Display="Dynamic"
                >*</asp:CompareValidator><asp:CustomValidator ID="CustomValidator1" runat="server" 
                ControlToValidate="txtPassword" ClientValidationFunction="Install_ValidatePassword" Display="Dynamic"
                OnServerValidate="ValidatePassword" >*</asp:CustomValidator><br />
            <small><%= BXInstaller.GetMessage(this, "Password.Hint") %></small>
            </font>
           </td>
    </tr>
    <tr>
        <td nowrap align="right" class="tablebody1">
            <font class="tablefieldtext"><span class="required">*</span><%= BXInstaller.GetMessage(this, "PasswordConfirmation") %>:</font>
        </td>
        <td class="tablebody3">
			<% RequiredFieldValidator6.ErrorMessage = BXInstaller.GetMessage(this, "Error.PasswordConfirmationRequired"); %>
            <asp:TextBox ID="txtPassword2" runat="server" Columns="30" TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtPassword2" Display="Dynamic"
                   >*</asp:RequiredFieldValidator><asp:CompareValidator
                        ID="CompareValidator1" runat="server" ControlToCompare="txtPassword" ControlToValidate="txtPassword2" Display="Dynamic"
                        ErrorMessage="">*</asp:CompareValidator></td>
    </tr>
</table>
<br>
<div align="right">
	<% btnNext.Text = BXInstaller.GetMessage(this, "ButtonText.Next"); %>
    <asp:Button runat="server" ID="btnNext" CssClass="button"
        OnClick="OnNext" />
</div>