@using MrCMS.Helpers
@using MrCMS.Web.Apps.Ecommerce.Entities.Discounts
@model MrCMS.Web.Apps.Ecommerce.Entities.Discounts.DiscountApplication

@{
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPopup.cshtml";
    Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/discount-application.js");
    var discount = ViewData["discount"] as Discount;
    var applicationTypeOptions = ViewData["application-type-options"] as List<SelectListItem>;
}
@using (Html.BeginForm("Add", "DiscountApplication", new {id = ""}, FormMethod.Post, new {data_discount_application = "true"}))
{
    @Html.Hidden("Discount.Id", discount.Id)
    <fieldset>
        <legend>
            Add Application
            <span class="pull-right display-inline btn-group">
                <button type="submit" class="btn btn-primary">Add</button>
            </span>
        </legend>
        <div class="form-group">
            @Html.Label("ApplicationType", "Application Type")
            @Html.DropDownList("ApplicationType", applicationTypeOptions, new {@class = "form-control", data_val = "true", data_val_required = "Please select a type"})
            @Html.ValidationMessage("ApplicationType")
        </div>
        <div data-application-fields>

        </div>
    </fieldset>
}