<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.DiscountInfoControl"
    CodeBehind="DiscountInfo.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="DecimalTextBox" Src="DecimalTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="SimpleTextBox" Src="SimpleTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="SelectCustomerRolesControl" Src="SelectCustomerRolesControl.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<ajaxToolkit:TabContainer runat="server" ID="DiscountTabs" ActiveTabIndex="0">
    <ajaxToolkit:TabPanel runat="server" ID="pnlDiscountInfo" HeaderText="Discount Info">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblDiscountType" Text="Discount type:"
                            ToolTip="The type of discount. Choose from applying to whole order or to individual product variants (SKU's)."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlDiscountType" CssClass="adminInput" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblDiscountRequirement" Text="Discount requirement:"
                            ToolTip="Requirements for discount to be applied." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlDiscountRequirement" AutoPostBack="True" CssClass="adminInput"
                            runat="server" OnSelectedIndexChanged="ddlDiscountRequirement_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblName" Text="Name:" ToolTip="The discount name."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <nopCommerce:SimpleTextBox runat="server" ID="txtName" CssClass="adminInput" ErrorMessage="Name is required">
                        </nopCommerce:SimpleTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblUsePercentage" Text="Use percentage:"
                            ToolTip="Determines whether to apply a percentage discount to the order/SKUs. If not enabled, a set value is discounted."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:CheckBox runat="server" ID="cbUsePercentage" AutoPostBack="True" OnCheckedChanged="cbUsePercentage_CheckedChanged">
                        </asp:CheckBox>
                    </td>
                </tr>
                <tr runat="server" id="pnlDiscountPercentage">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblDiscountPercentage" Text="Discount Percentage:"
                            ToolTip="The percentage discount to apply to order/SKUs." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtDiscountPercentage"
                            Value="0" RequiredErrorMessage="Discount percentage is required" RangeErrorMessage="The value must be from 0 to 100"
                            MinimumValue="0" MaximumValue="100"></nopCommerce:DecimalTextBox>
                    </td>
                </tr>
                <tr runat="server" id="pnlDiscountAmount">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblDiscountAmount" Text="Discount amount:"
                            ToolTip="The discount amount to apply to the order/SKUs." ToolTipImage="~/Administration/Common/ico-help.gif" />
                        [<%=CurrencyManager.PrimaryStoreCurrency.CurrencyCode%>]:
                    </td>
                    <td class="adminData">
                        <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtDiscountAmount"
                            Value="0" RequiredErrorMessage="Discount amount is required" MinimumValue="0"
                            MaximumValue="999999" RangeErrorMessage="The value must be from 0 to 999999">
                        </nopCommerce:DecimalTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblStartDate" Text="Start date:" ToolTip="The start of the discount period in Coordinated Universal Time (UTC)."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtStartDate" />
                        <asp:ImageButton runat="Server" ID="iStartDate" ImageUrl="~/images/Calendar_scheduleHS.png"
                            AlternateText="Click to show calendar" /><br />
                        <ajaxToolkit:CalendarExtender ID="cStartDateButtonExtender" runat="server" TargetControlID="txtStartDate"
                            PopupButtonID="iStartDate" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblEndDate" Text="End date:" ToolTip="The end of the discount period in Coordinated Universal Time (UTC)."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtEndDate" />
                        <asp:ImageButton runat="Server" ID="iEndDate" ImageUrl="~/images/Calendar_scheduleHS.png"
                            AlternateText="Click to show calendar" /><br />
                        <ajaxToolkit:CalendarExtender ID="cEndDateButtonExtender" runat="server" TargetControlID="txtEndDate"
                            PopupButtonID="iEndDate" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblRequiresCouponCode" Text="Requires coupon code:"
                            ToolTip="If checked, a customer supply a valid coupon code for the discount to be applied."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:CheckBox runat="server" ID="cbRequiresCouponCode" AutoPostBack="True" OnCheckedChanged="cbRequiresCouponCode_CheckedChanged">
                        </asp:CheckBox>
                    </td>
                </tr>
                <tr runat="server" id="pnlCouponCode">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCouponCode" Text="Coupon code:" ToolTip="The discount coupon code."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox ID="txtCouponCode" runat="server" CssClass="adminInput"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="pnlCustomerRoles" HeaderText="Customers role">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td>
                        <nopCommerce:SelectCustomerRolesControl ID="CustomerRoleMappingControl" runat="server"
                            CssClass="adminInput"></nopCommerce:SelectCustomerRolesControl>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>