<div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">&times;</button>
    <h3 class="modal-title">Update Stock for {[{ product.name }]}</h3>
</div>
<form id='stockForm' name='stockForm' ng-submit="save()" class="form-horizontal">
    <div class="modal-body">

            <div class="modal-body">
            <br>
                <div class="form-group">
                    <label class="col-sm-3 control-label label-required" for="inputType">Type:</label>
                    <div class="col-sm-9">
                       <select id="inputType" name="type" ng-model="transaction.type" class="form-control" required>
                            <option value="">Select the type</option>
                            <option value="1">IN</option>
                            <option value="-1">OUT</option>
                       </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label label-required" for="inputQuantity">Quantity</label>
                    <div class="col-sm-9">
                        <input id="inputQuantity" type="number" min="1" name="buffer" class="form-control" ng-model="transaction.quantity" >
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label label-required" for="inputReason">Reason</label>
                    <div class="col-sm-9">
                        <textarea id="inputReason" type="text" name="name" ng-model="transaction.reason" class="form-control" required></textarea>
                    </div>
                </div>

            </div>


    </div>
    <div class="form-actions">
        <button class="btn btn-primary" ng-disabled=" ! transaction.quantity || ! transaction.reason || loading " data-loading-text="Saving..." data-success-text="Saved.."><i ng-if="loading" class="fa fa-spinner fa-spin"></i> Update Stock</button>
    </div>
</form>