@using MrCMS.Helpers
@model MrCMS.Web.Apps.Ecommerce.Entities.Discounts.DiscountLimitation
@{
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPopup.cshtml";
    Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/discount-limitation.js");
    Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/category-search.js");
    Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/sku-search.js");
}

@using (Html.BeginForm("Edit", "DiscountLimitation", FormMethod.Post, new { data_discount_limitation = "true" }))
{
    <fieldset>
        <legend>
            Edit @Model.DisplayName
            <span class="pull-right display-inline btn-group">
                <button type="submit" class="btn btn-primary">Edit</button>
            </span>
        </legend>
        <div data-limitation-fields>
            @{
                try
                {
                    Html.RenderAction("Fields", Model.GetType().Name, new {id = Model.Id});
                }
                catch
                {
                }
            }
        </div>
    </fieldset>
}