@model PantheonRA.BackOffice.Models.ItemEditViewModel

<div class="modal fade" id="newProductModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">@Loc.AddingProduct</h4>
            </div>
            <div class="modal-body">
                <ul class="nav nav-tabs">
                    <li role="presentation" class="active"><a href="#">@Loc.BasicData</a></li>
                </ul>
                <div class="container-fluid">
                    <div class="row">
                        <form action="@Url.Action("Create", "Products")", method="post" id="productForm" class="form-horizontal">
                            
                            @Html.HiddenFor(editModel => editModel.Id)

                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.Name, Loc.Name, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.TextBoxFor(editModel => editModel.Name, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(editModel => editModel.Name)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.SelectedProductTypeId, Loc.ProductSetItemType, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.Hidden("SelectedProductTypeIdHidd", Model.SelectedProductTypeId, new { @id= "SelectedProductTypeIdHidd" })
                                    @Html.DropDownListFor(editModel => editModel.SelectedProductTypeId, new List<SelectListItem>() { }, new { @class = "form-control", @id="ddlItemTypes" })
                                    @Html.ValidationMessageFor(editModel => editModel.SelectedProductTypeId)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.SelectedProductCategoryId, Loc.ProductGroup, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.Hidden("SelectedProductCategoryIdHidd", Model.SelectedProductCategoryId, new { @id = "SelectedProductCategoryIdHidd" })
                                    @Html.DropDownListFor(editModel => editModel.SelectedProductCategoryId, new List<SelectListItem>() { }, new { @class = "form-control", @id = "ddlItemCategories" })
                                    @Html.ValidationMessageFor(editModel => editModel.SelectedProductCategoryId)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.SelectedMeasurementUnitId, Loc.UnitOfMeasurement, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.Hidden("SelectedMeasurementUnitIdHidd", Model.SelectedMeasurementUnitId, new { @id = "SelectedMeasurementUnitIdHidd" })
                                    @Html.DropDownListFor(editModel => editModel.SelectedMeasurementUnitId, new List<SelectListItem>(), new { @class = "form-control", @id = "ddlMeasurementUnits" })
                                    @Html.ValidationMessageFor(editModel => editModel.SelectedMeasurementUnitId)
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            @Html.CheckBoxFor(editModel => editModel.IsWhole) @Loc.IsWhole
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            @Html.CheckBoxFor(editModel => editModel.IsWeighted) @Loc.IsScale
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.DefaultQuantity, Loc.DefaultQuantity, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.TextBoxFor(editModel => editModel.DefaultQuantity, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(editModel => editModel.DefaultQuantity)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.SelectedTaxId, Loc.TaxRate, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.Hidden("SelectedTaxIdHidd", Model.SelectedTaxId, new { @id = "SelectedTaxIdHidd" })
                                    @Html.DropDownListFor(editModel => editModel.SelectedTaxId, new List<SelectListItem>() { }, new { @class = "form-control", @id = "ddlTaxes" })
                                    @Html.ValidationMessageFor(editModel => editModel.SelectedTaxId)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.PriceWithTax, Loc.ToPay, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.TextBoxFor(editModel => editModel.PriceWithTax, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(editModel => editModel.PriceWithTax)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.MinimumStock, Loc.MinimumStock, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.TextBoxFor(editModel => editModel.MinimumStock, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(editModel => editModel.MinimumStock)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.Barcode, Loc.Barcode, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.TextBoxFor(editModel => editModel.Barcode, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            @Html.CheckBoxFor(editModel => editModel.IsActive) @Loc.IsActive
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            @Html.CheckBoxFor(editModel => editModel.IsForSale) @Loc.IsSale
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(editModel => editModel.Picture, Loc.Picture, new { @class = "col-sm-3 control-label" })
                                <div class="col-sm-9">
                                    @Html.TextBoxFor(editModel => editModel.Picture, new { @class = "form-control" })
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">@Loc.Cancel</button>
                <button type="button" class="btn btn-primary" id="saveItemInsertButton">@Loc.Save</button>
            </div>
        </div>
    </div>
</div>
