@model MrCMS.Web.Apps.Ecommerce.Entities.Shipping.UKFirstClassShippingCalculation
@{
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPopup.cshtml";
    var criteriaOptions = ViewData["criteria-options"] as List<SelectListItem> ?? new List<SelectListItem>();
}
@using (Html.BeginForm("Add", "UKFirstClassShippingCalculation", new { id = "" }, FormMethod.Post, new { id = "add-shipping-calculation" }))
{
    <fieldset>
        <legend>
            Add Shipping Calculation
            <span class="btn-group display-inline pull-right">
                <button class="btn btn-primary" id="save-add" type="submit"> Save & Close</button>
            </span>
        </legend>

        <div class="row">
            <div class="col-xs-12">
                <div class="form-group">
                    @Html.LabelFor(x => x.ShippingCriteria)
                    @Html.DropDownListFor(x => x.ShippingCriteria, criteriaOptions, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.ShippingCriteria)
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.LowerBound)
                    @Html.TextBoxFor(x => x.LowerBound, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.LowerBound)
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.UpperBound)
                    @Html.TextBoxFor(x => x.UpperBound, new { placeholder = "Leave blank if there is no upper bound", @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.UpperBound)
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.BaseAmount)
                    @Html.TextBoxFor(x => x.BaseAmount, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.BaseAmount)
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.RestrictedTo)
                    @Html.TextBoxFor(x => x.RestrictedTo, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.RestrictedTo)
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.ExcludedFrom)
                    @Html.TextBoxFor(x => x.ExcludedFrom, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.ExcludedFrom)
                </div>
            </div>
        </div>
    </fieldset>
}