<%@ Control Language="C#" AutoEventWireup="true" CodeFile="template.ascx.cs" Inherits="bitrix_components_bitrix_photogallery_album_edit_templates__default_template" EnableViewState="false" %>
<%@ Reference VirtualPath="~/bitrix/components/bitrix/photogallery.album.edit/component.ascx" %>
<% if(Component.CanModify){ %>
<table width="100%">
    <tr>
        <td colspan="2">
            <bx:BXValidationSummary ID="validationSummary" runat="server" 
                CssClass="errorSummary" HeaderText="<%$ Loc:Kernel.Error %>"
                BorderColor="Red" BorderStyle="Solid" BorderWidth="1px" />
        </td>
    </tr>
    <tr>
        <td align="right" valign="middle">
            <%= GetMessage("Legend.Title") %><span style="color:Red;">*</span>:
        </td>
        <td align="left">
            <asp:TextBox ID="AlbumTitle" runat="server" ></asp:TextBox>
            <asp:RequiredFieldValidator runat="server" ID="valTitle" ControlToValidate="AlbumTitle" ErrorMessage="<%$ Loc:Error.TitleIsRequired %>">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td width="40%"  align="right"  valign="middle">
            <%= GetMessage("Legend.ParentSection") %></td>
        <td width="60%"  align="left">
            <asp:DropDownList ID="ddlParentSection" runat="server">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="center">
            <%= GetMessage("Legend.Description") %><br />
            <asp:TextBox ID="AlbumDescription" runat="server" TextMode="MultiLine" Rows="10" Width="100%"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td align="left" valign="middle" colspan="2">
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="<%$ Loc:Kernel.Save %>" />
            <asp:Button  runat="server" ID="Cancel" Text="<%$ Loc:Cancel %>" OnClientClick="GoBack(); return false;" UseSubmitBehavior="false" /> 
        </td>
    </tr>
</table>
<%} else { %>
    <%= GetMessage("YouDontHaveRightsToPerformThisAction") %> <a href="<%= Component.BackUrl %>" EnableAjax="true"><%= GetMessage("Return") %></a>
<%} %>

<script type="text/javascript" language="javascript">
    window.GoBack = function()
    {
        window.location.href = "<%= Component.BackUrl %>";
    }
</script>

