@using InventoryTraker.Web.Helpers
@model InventoryTraker.Web.Models.InventoryTypeViewModel
@{
    var inventoryType = Html.Angular().ModelFor("vm.inventoryType");
}
<form novalidate
	  name="vm.form"
	  ng-submit="vm.form.$valid && vm.add()">
	<fieldset ng-disabled="vm.saving">

		<div class="modal-header">
		    <h3 class="modal-title"><i class="fa fa-cube"></i> Add Commodity Type</h3>
		</div>

		<div class="modal-body">

            <div class="alert alert-info" ng-hide="vm.errorMessages.length">
                Enter details for the added commodity below.
            </div>
            <div class="alert alert-danger" ng-show="vm.errorMessages.length">
                There were problems adding the commodity.
                <ul>
                    <li ng-repeat="error in vm.errorMessages">{{error}}</li>
                </ul>
            </div>

            @Html.Angular().FormForModel("vm.inventoryType")
             
        </div>

	<div class="modal-footer">
		<button class="btn btn-success">Add</button>
		<button type="button" class="btn" ng-click="$dismiss()">Cancel</button>
	</div>

	</fieldset>
</form>