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

	<div class="modal-header">
		<h3 class="modal-title"><i class="fa fa-cubes"></i> Inventory Removal</h3>
	</div>

	<div class="modal-body">

        <status-message message="vm.statusMessage" ng-hide="vm.errorMessages.length"></status-message>
	    <error-list errors="vm.errorMessages"></error-list>

	    <div class="panel panel-default">
	        <div class="panel-body">
	            <inventory-info inventory="inventory"></inventory-info>
	        </div>
	    </div>

	    <div class="form-group" form-group-validation="TransactionType">
            <label class="radio-inline">
                <input type="radio" name="TransactionType"
                       ng-model="vm.removeForm.transactionType"
                       value="Shreded"
                       required />
                Shreded
            </label>
            <label class="radio-inline">
                <input type="radio" name="TransactionType"
                       ng-model="vm.removeForm.transactionType"
                       value="Loss"
                       required />
                Loss
            </label>
        </div>

	    @removeForm.FormGroupFor(m => m.RemovedDate)
        @removeForm.FormGroupFor(m => m.Memo)

    </div>

	<div class="modal-footer">
		<button class="btn btn-success" ng-disabled="vm.form.$invalid || vm.form.$pristine">Remove</button>
		<button type="button" class="btn" ng-click="$parent.$dismiss()">Cancel</button>
	</div>

	</fieldset>
</form>