<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFAdmin/ModalAdminPage.master" CodeBehind="MenuEdit.aspx.vb" Inherits="WebFoundations.WFPortal.UI.MenuEdit" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="../../WFControls/URLPicker.ascx" TagName="URLPicker" TagPrefix="uc2" %>
<%@ Register Src="../../WFControls/ImagePicker.ascx" TagName="ImagePicker" TagPrefix="uc3" %>
<%@ Register Src="../../WFControls/AccessList.ascx" TagName="AccessList" TagPrefix="uc1" %>
<%@ Register Namespace="WebFoundations.ServerControls" Assembly="WebFoundations.ServerControls" TagPrefix="WFF" %>
<%@ Register Src="../../WFControls/WFAccessList.ascx" TagName="WFAccessList" TagPrefix="uc4" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">

    <telerik:RadTabStrip ID="menutab" runat="server" MultiPageID="menupages" SelectedIndex="0">
        <Tabs>
            <telerik:RadTab runat="server" PageViewID="MnuConfig" Text="Configuracao" />
            <telerik:RadTab runat="server" PageViewID="MnuItems" Text="&#205;tens" Enabled="false" />
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="menupages" runat="server" SelectedIndex="0">
        <telerik:RadPageView ID="MnuConfig" runat="server">
            <div class="fields">
                <label>
                    <asp:Label ID="lblportaltit" runat="server" />
                    <asp:Label ID="lblportal" runat="server" />
                </label>
                <label>
                    <asp:Label ID="lblalias" runat="server" />
                    <asp:TextBox ID="txtalias" runat="server" MaxLength="50" />
                    <asp:RequiredFieldValidator ID="reqalias" Display="Dynamic" runat="server" ControlToValidate="txtalias" />
                    <asp:RegularExpressionValidator ID="vlalias" runat="server" ControlToValidate="txtalias" ValidationExpression="[a-z|A-Z][a-z|A-Z|0-9]*" />
                </label>
                <label>
                    <asp:Label ID="lbleditors" runat="server" />
                    <uc1:AccessList ID="lsteditors" AdmMode="true" runat="server" />
                </label>
                <label>
                    <asp:Label ID="lblreaders" runat="server" />
                    <uc4:WFAccessList ID="lstreaders" runat="server" />
                </label>
                <label>
                    <asp:Label ID="lbllanguages" runat="server" />
                    <asp:TextBox ID="txtlanguages" runat="server" MaxLength="50" />
                </label>
            </div>
            <section class="actions">
                <asp:Button ID="btnok" runat="server" CssClass="button" />
                <input id="btncancel" type="button" class="button" value="button" runat="server" />
            </section>
        </telerik:RadPageView>
        <telerik:RadPageView ID="MnuItems" runat="server">
            <table cellspacing="2" cellpadding="2" width="100%" border="0">
                <tr>
                    <td valign="top">
                        <asp:ImageButton ID="btnaddroot" OnClick="btnaddroot_Click" runat="server" ImageUrl="~/WFResources/Content/TreeView/addroot.gif"></asp:ImageButton>
                        <asp:Label ID="lblroot" runat="server" Text="Label"></asp:Label>
                        <telerik:RadTreeView ID="menutree" runat="server" runat="server" EnableDragAndDrop="True"
                            MultipleSelect="false" EnableDragAndDropBetweenNodes="true"
                            DataTextField="Text" DataValueField="Id" DataSourceID="DSMenuItems">
                        </telerik:RadTreeView>
                        <WFF:MenuDataSource ID="DSMenuItems" runat="server" AdminView="False"></WFF:MenuDataSource>
                    </td>
                    <td id="ItemEdit" valign="top" runat="server" visible="false">
                        <div class="fields">
                            <label>
                                <asp:Label ID="lbltitle" runat="server" />
                                <asp:TextBox ID="txttitle" runat="server" MaxLength="100" />
                            </label>
                            <div>
                                <asp:Label ID="lblimage" runat="server" />
                                <uc3:ImagePicker ID="ItemImage" runat="server" />
                            </div>
                            <label>
                                <asp:Label ID="lbldescription" runat="server" />
                                <asp:TextBox ID="txtdescription" runat="server" MaxLength="150" />
                            </label>
                            <label>
                                <asp:Label ID="lblopen" runat="server" />
                                <asp:DropDownList ID="cmbopen" runat="server" />
                            </label>
                            <label>
                                <asp:Label ID="lblitreaders" runat="server" />
                                <uc4:WFAccessList ID="Readers" AnonymousValue="-6" runat="server" />
                            </label>
                            <label>
                                <asp:Label ID="lblurl" runat="server" />
                                <uc2:URLPicker ID="ItemURL" runat="server" />
                            </label>
                            <label>
                                <asp:Label ID="lbllanguage" runat="server" />
                                <asp:TextBox ID="txtlanguage" runat="server" MaxLength="5" />
                            </label>
                            <label>
                                <asp:Label ID="lbllocal" runat="server" />
                                <asp:CheckBox ID="chklocal" runat="server" CssClass="checkbox" />
                            </label>
                            <label>
                                <asp:Label ID="lblnamekey" runat="server" />
                                <asp:TextBox ID="txtnamekey" runat="server" MaxLength="50" />
                            </label>
                        </div>
                        <section class="actions">
                            <asp:Button ID="btnokitem" runat="server" />&nbsp;&nbsp;
                            <asp:Button ID="btncancelitem" runat="server"/>
                        </section>
                    </td>
                </tr>
            </table>
        </telerik:RadPageView>
    </telerik:RadMultiPage>

</asp:Content>
