<%@ Page Language="C#" MasterPageFile="~/bitrix/admin/AdminMasterPage.master" 
	AutoEventWireup="true" CodeFile="BlogEdit.aspx.cs" Inherits="bitrix_admin_BlogEdit" %>
	
<%@ Register Src="~/bitrix/controls/Main/OperationsEdit.ascx" TagName="OperationsEdit"
	TagPrefix="bx" %>
	
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	
	<bx:BXContextMenuToolbar ID="BXBlogEditToolbar" runat="server" OnCommandClick="OnToolBarButtonClick">
		<Items>
			<bx:BXCmSeparator ID="ListButton" runat="server" SectionSeparator="true" />
			<bx:BXCmImageButton CssClass="context-button icon btn_list" CommandName="list"
				Text="<%$ LocRaw:ActionText.GoBack %>" Title="<%$ LocRaw:ActionTitle.GoBack %>" Href="BlogList.aspx" />
		
			<bx:BXCmSeparator SectionSeparator="true" />
			<bx:BXCmImageButton ID="AddButton"
				CommandName="add" Text="<%$ LocRaw:Kernel.Add %>" Title="<%$ LocRaw:ActionTitle.Add %>"
				CssClass="context-button icon btn_new" Href="BlogEdit.aspx" />
				
			<bx:BXCmSeparator SectionSeparator="true" />
			<bx:BXCmImageButton ID="DeleteButton"
				CommandName="delete" Text="<%$ LocRaw:Kernel.Delete %>" Title="<%$ LocRaw:ActionTitle.Delete %>"
				CssClass="context-button icon btn_delete" ShowConfirmDialog="true" ConfirmDialogText="<%$ LocRaw:ActionConfirmDialogText.Delete %>"/>
		</Items>
	</bx:BXContextMenuToolbar>
	<bx:BXValidationSummary ID="errorMessage" runat="server" CssClass="errorSummary" HeaderText="<%$ Loc:Kernel.Error %>" ValidationGroup="BlogEdit" />
	<bx:BXTabControl ID="TabControl" runat="server" OnCommand="OnBlogEdit" ValidationGroup="BlogEdit">
		<bx:BXTabControlTab ID="MainSettingsTab" Runat="server" Selected="True" Text="<%$ LocRaw:TabText.Blog %>" Title="<%$ LocRaw:TabTitle.Blog %>">
			<table class="edit-table" cellspacing="0" cellpadding="0" border="0">
				<% 
				if (BlogId > 0)
				{
					%><tr valign="top"><td class="field-name">ID:</td><td><%= BlogId %></td></tr><%
				}
				%>
				
				<tr valign="top" title="<%= GetMessage("FieldTooltip.Active") %>">
					<td class="field-name" width="40%"><%= GetMessage("FieldLabel.Active") %>:</td>
					<td width="60%"><asp:CheckBox ID="BlogActive" runat="server" /></td>
				</tr>

				<tr valign="top" title="<%= GetMessage("FieldTooltip.Owner") %>">
					<td class="field-name"><span class="required">*</span><%= GetMessage("FieldLabel.Owner") %>:</td>
					<td>
					    <%--<asp:DropDownList runat="server" ID="BlogOwner"></asp:DropDownList>--%>
						<asp:TextBox runat="server" ID="BlogOwner"></asp:TextBox>
						<asp:RequiredFieldValidator ID="BlogOwnerRequiredFieldValidator" runat="server" ValidationGroup="BlogEdit" ControlToValidate="BlogOwner" ErrorMessage="<%$ LocRaw:Message.OwnerNotSpecified %>" Display="Dynamic">*</asp:RequiredFieldValidator>						
					</td>
				</tr>					

				<tr valign="top" title="<%= GetMessage("FieldTooltip.Name") %>">
					<td class="field-name"><span class="required">*</span><%= GetMessage("FieldLabel.Name") %>:</td>
					<td>
						<asp:TextBox ID="BlogName" runat="server" Width="350px" />
						<asp:RequiredFieldValidator ID="NameRequiredValidator" runat="server" ValidationGroup="BlogEdit" ControlToValidate="BlogName" ErrorMessage="<%$ Loc:Message.NameNotSpecified %>" Display="Dynamic">*</asp:RequiredFieldValidator>
					</td>
				</tr>				

				<tr valign="top" title="<%= GetMessage("FieldTooltip.Slug") %>" >
					<td class="field-name"><span class="required">*</span><%= GetMessage("FieldLabel.Slug") %>:<br /><small><%= GetMessage("FieldComment.Slug") %></small></td>
					<td>
						<asp:TextBox ID="BlogSlug" runat="server" Width="350px" />
						<asp:RequiredFieldValidator ID="SlugValudatorRequired" runat="server" ValidationGroup="BlogEdit" ControlToValidate="BlogSlug" ErrorMessage="<%$ Loc:Message.SlugNotSpecified %>" Display="Dynamic">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator runat="server" ID="SlugValudatorContent" ValidationExpression="^[a-zA-Z\-\d]+$" ControlToValidate="BlogSlug" ValidationGroup="BlogEdit" ErrorMessage="<%$ Loc:Message.InvalidSlug %>" Display="Dynamic">*</asp:RegularExpressionValidator>
					</td>
				</tr>
				
				<tr valign="top" title="<%= GetMessage("FieldTooltip.Description") %>" >
					<td class="field-name"><%= GetMessage("FieldLabel.Description") %>:</td>
					<td>
						<asp:TextBox Rows="7" ID="BlogDescription"  TextMode="MultiLine" runat="server" Width="350px" />						
					</td>
				</tr>
							
                <tr valign="top" title="<%= GetMessage("FieldTooltip.Categories") %>">
					<td class="field-name"><%= GetMessage("FieldLabel.Categories") %>:</td>
					<td>
                        <asp:ListBox runat="server" ID="BlogCategories" SelectionMode="Multiple" Width="350px" Height="175px">
                        </asp:ListBox>
					</td>
				</tr>				
				
				<tr valign="top" title="<%= GetMessage("FieldTooltip.CommentNotification") %>">
					<td class="field-name" width="40%"><%= GetMessage("FieldLabel.CommentNotification") %>:</td>
					<td width="60%">
		                <asp:CheckBox runat="server" ID="BlogNotifyOfComments" />
					</td>
				</tr>					
				
				<tr valign="top" title="<%= GetMessage("FieldTooltip.Sort") %>">
					<td class="field-name"><%= GetMessage("FieldLabel.Sort") %>:</td>
					<td>
					    <asp:TextBox ID="BlogSort" runat="server" Width="50px" />
					    <asp:RegularExpressionValidator runat="server" ID="SortValidator" ValidationExpression="^[\d]*$" ControlToValidate="BlogSort" ValidationGroup="BlogEdit" ErrorMessage="<%$ Loc:Message.InvalidSortIndex %>" Display="Dynamic">*</asp:RegularExpressionValidator>
					</td>
				</tr>
				
				<tr valign="top" title="<%= GetMessage("FieldTooltip.XmlId") %>" >
					<td class="field-name"><%= GetMessage("FieldLabel.XmlId") %>:</td>
					<td>
						<asp:TextBox Rows="7" ID="BlogXmlId"  runat="server" Width="350px" />						
					</td>
				</tr>				
			</table>
		</bx:BXTabControlTab>
		
		<%-- 
		<bx:BXTabControlTab ID="PermissionsTab" Runat="server" Text="Разрешения" Title="Установка разрешений">
		    <table class="edit-table" cellspacing="0" cellpadding="0" border="0">
				<tr valign="top" title="Доступ к сообщениям по умолчанию (кто может видеть сообщения)">
					<td class="field-name" width="40%">Доступ к сообщениям:</td>
					<td width="60%">
		                <asp:DropDownList runat="server" ID="BlogPostVisibilityMode" Width="300px" ></asp:DropDownList>
					</td>
				</tr>
				<tr valign="top" title="Разрешить комментировать">
					<td class="field-name">Разрешить комментировать:</td>
					<td>
		                <asp:DropDownList runat="server" ID="BlogAddCommentPermission" Width="300px" ></asp:DropDownList>
					</td>
				</tr>
				<tr valign="top" title="Скрывать комментарии">
					<td class="field-name">Скрывать комментарии:</td>
					<td>
                        <asp:DropDownList runat="server" ID="BlogCommentApproval" Width="300px" ></asp:DropDownList>
					</td>
				</tr>											
			</table>	
		</bx:BXTabControlTab>
		
		<bx:BXTabControlTab ID="AdditionalSettingsTab" Runat="server" Text="Дополнительно" Title="Дополнительные настройки блога">
		    <table class="edit-table" cellspacing="0" cellpadding="0" border="0">
				<tr valign="top" title="Управление уведомлениями о новых комментариях">
					<td class="field-name" width="40%">Уведомлять о новых комментариях:</td>
					<td width="60%">
		                <asp:CheckBox runat="server" ID="BlogNotifyOfComments" />
					</td>
				</tr>
            </table>
        </bx:BXTabControlTab>
        --%>
	</bx:BXTabControl>
</asp:Content>

