<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFContent/Modules/ModuleConfig.master" CodeBehind="Classifieds.aspx.vb" Inherits="WebFoundations.WFPortal.BaseModules.UI.Classifieds1" %>

<%@ Register Assembly="WebFoundations.ServerControls" Namespace="WebFoundations.ServerControls" TagPrefix="cc1" %>
<%@ Register Assembly="WebFoundations.WFPortal.Controls" Namespace="WebFoundations.WFPortal.Controls.Content" TagPrefix="WFC" %>

<asp:Content runat="server" ContentPlaceHolderID="MainContent">
    <WFC:EditorManager ID="EditorManager1" runat="server" />

    <div class="fields">
        <label>
            <asp:Label ID="lbltitle" runat="server" />
            <asp:TextBox ID="txttitle" runat="server" MaxLength="80" />
            <asp:RequiredFieldValidator ID="reqtitle" runat="server" ControlToValidate="txttitle" Display="Dynamic" />
        </label>
        <label>
            <asp:Label ID="lbldescription" runat="server" />
            <WFC:RichTextEditor Width="100%" runat="server" ID="richDescription" />
            <cc1:TextArea ID="txtdescription" MaxLength="400" runat="server" Height="6em" />
            <asp:RequiredFieldValidator ID="reqdescription" runat="server" ControlToValidate="txtdescription" Display="Dynamic" />
        </label>
        <label>
            <asp:Label ID="lblprice" runat="server" />
            <asp:TextBox ID="txtprice" runat="server" MaxLength="50" />
            <asp:RequiredFieldValidator ID="reqprice" runat="server" ControlToValidate="txtprice" Display="Dynamic" />
        </label>
        <label>
            <asp:Label ID="lblusername" runat="server" />
            <asp:TextBox ID="txtusername" runat="server" MaxLength="50" />
            <asp:RequiredFieldValidator ID="requsername" runat="server" ControlToValidate="txtusername" Display="Dynamic" />
        </label>
        <label>
            <asp:Label ID="lbluseremail" runat="server" />
            <asp:TextBox ID="txtuseremail" runat="server" MaxLength="150" />
            <asp:RegularExpressionValidator ID="vlemail" runat="server" ControlToValidate="txtuseremail"
                Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
        </label>
        <label>
            <asp:Label ID="lbluserphone" runat="server" />
            <asp:TextBox ID="txtuserphone" runat="server" MaxLength="20" />
        </label>
        <div>
            <asp:Label ID="lblimage" runat="server" />
            <div>
                <asp:FileUpload ID="imgUpload" runat="server" />
                <asp:RegularExpressionValidator runat="server" ID="vlImage" Display="Dynamic" ControlToValidate="imgUpload" ValidationGroup="ImageAdd"
                    ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF|.jpeg|.JPEG|.png|.PNG)$" />
                <asp:Button ID="btnAddImage" ValidationGroup="ImageAdd" runat="server" />
            </div>
            <asp:Label ID="lblnoimages" runat="server" />
            <asp:GridView ID="grdImages" runat="server" AutoGenerateColumns="False"
                BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                CellPadding="4" EnableModelValidation="True" ForeColor="Black"
                GridLines="Vertical" Width="100%">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:ImageButton ID="btndel" CausesValidation="false" ImageUrl="~/WFResources/Common/Images/icons/delete.png" runat="server"></asp:ImageButton>
                            <asp:ImageButton ID="btnup" CausesValidation="false" ImageUrl="~/WFResources/Common/Images/icons/move-up.png" runat="server"></asp:ImageButton>
                            <asp:ImageButton ID="btndown" CausesValidation="false" ImageUrl="~/WFResources/Common/Images/icons/move-down.png" runat="server"></asp:ImageButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="lnkImage" Target="_blank" runat="server"></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            </asp:GridView>
        </div>
        <label>
            <asp:Label ID="lblthumbnail" runat="server" />
            <asp:ImageButton ID="btndelthumb" CausesValidation="false" ImageUrl="~/WFResources/Common/Images/icons/delete.png" Visible="false" runat="server" />
            <asp:HyperLink ID="lnkthumb" Target="_blank" runat="server" />
            <asp:FileUpload ID="thumbUpload" runat="server" />
            <asp:RegularExpressionValidator runat="server" ID="vlThumb" ControlToValidate="thumbUpload"
                ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF|.jpeg|.JPEG|.png|.PNG)$" />
        </label>
    </div>
    <section class="actions">
        <asp:Button ID="btnok" runat="server" CssClass="button" />
        <asp:Button ID="btncancel" runat="server" CssClass="button" CausesValidation="false" />
    </section>
</asp:Content>
