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

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/WFControls/ImagePicker.ascx" TagName="ImagePicker" TagPrefix="uc1" %>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadTabStrip ID="polltab" SelectedIndex="0" MultiPageID="pollpages" runat="server" AutoPostBack="True" CausesValidation="False">
        <Tabs>
            <telerik:RadTab ID="Tab1" runat="server" PageViewID="pollconfig" Text="Configuration" />
            <telerik:RadTab ID="Tab2" runat="server" PageViewID="pollanswers" Text="Answers" />
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="pollpages" runat="server" SelectedIndex="0">
        <telerik:RadPageView ID="pollconfig" runat="server">
            <div class="fields">
                <label>
                    <asp:Label ID="lblquestion" runat="server" />
                    <asp:TextBox ID="txtquestion" runat="server" MaxLength="200" />
                </label>
                <label>
                    <asp:Label ID="lblmessage" runat="server" />
                    <asp:TextBox ID="txtmessage" runat="server" MaxLength="200" />
                </label>
                <label>
                    <asp:Label ID="lblimage" runat="server" />
                    <uc1:ImagePicker ID="imgpkImage" MaxFileSize="1024" runat="server" />
                </label>
                <label>
                    <asp:Label ID="lblalttext" runat="server" />
                    <asp:TextBox ID="txtalttext" runat="server" MaxLength="50" />
                </label>
                <asp:CheckBox ID="chkunique" CssClass="checkbox" runat="server" />
                <label>
                    <asp:Label ID="lblcolumns" runat="server" />
                    <asp:TextBox ID="txtcolumns" runat="server" MaxLength="4" />
                    <asp:RegularExpressionValidator ID="vlcolumns" runat="server" Display="Dynamic" ControlToValidate="txtcolumns" ValidationExpression="-[0-9]+|[0-9]+" />
                </label>
                <label>
                    <asp:Label ID="lblresults" runat="server" />
                    <asp:DropDownList ID="lstresults" runat="server" />
                </label>
                <label>
                    <asp:Label ID="lblwidth" runat="server" />
                    <asp:TextBox ID="txtwidth" runat="server" MaxLength="4" />
                    <asp:RegularExpressionValidator ID="vlwidth" runat="server" Display="Dynamic" ControlToValidate="txtwidth" ValidationExpression="-[0-9]+|[0-9]+" />
                </label>
                <label>
                    <asp:Label ID="lblheight" runat="server" />
                    <asp:TextBox ID="txtheight" runat="server" MaxLength="4" />
                    <asp:RegularExpressionValidator ID="vlheight" runat="server" Display="Dynamic" ControlToValidate="txtheight" ValidationExpression="-[0-9]+|[0-9]+" />
                </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="pollanswers" runat="server">
            <asp:GridView ID="grdanswers" runat="server" Width="98%" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:ImageButton ID="btnedit" runat="server" />
                            <asp:ImageButton ID="btndel" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Answer" />
                    <asp:BoundField DataField="AltText" />
                    <asp:BoundField DataField="Votes" />
                </Columns>
            </asp:GridView>
            <section class="actions">
                <asp:Button ID="btnadd" runat="server" CssClass="button" />
            </section>
            <asp:Panel ID="pnledit" runat="server" Visible="false">
                <div class="fields no-columns">
                    <label>
                        <asp:Label ID="lblanswer" runat="server" />
                        <asp:TextBox ID="txtanswer" runat="server" MaxLength="200" />
                    </label>
                    <label>
                        <asp:Label ID="lblimage2" runat="server" />
                        <uc1:ImagePicker ID="imgpkImage2" MaxFileSize="1024" runat="server" />
                    </label>
                    <label>
                        <asp:Label ID="lblalttext2" runat="server" />
                        <asp:TextBox ID="txtalttext2" runat="server" MaxLength="50" />
                    </label>
                    <label>
                        <asp:Label ID="lblmessage2" runat="server" />
                        <asp:TextBox ID="txtmessage2" runat="server" MaxLength="200" />
                    </label>
                </div>
                <section class="actions">
                    <asp:Button ID="btnokedit" runat="server" CssClass="button" />
                    <asp:Button ID="btncanceledit" runat="server" CssClass="button" />
                </section>
            </asp:Panel>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
</asp:Content>
