

<?php $__env->startSection('title'); ?>
Add New  Category 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<ol class="breadcrumb pull-right">
        <li><a href="<?php echo e(route('home')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>
         <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'view-unit-category')): ?>
        <li ><a href="<?php echo e(route('unitCategory.all')); ?>"> Categories </a></li>
        <?php endif; ?>
        <li class="active">Add Categorie</li>
      </ol>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>

<div class="container-fluid">
                <!--.row-->
                <div class="row">

                    <div class="col-md-12">
                        <div class="white-box">
                            <h3 class="box-title m-b-0"><i class="fa fa-square" aria-hidden="true"></i>&nbsp;Add New Category</h3>
                            <p class="text-muted m-b-30 font-13" style="height: 5px;"> Add the information </p>
                            <hr>
                            <form class="form-horizontal" action="<?php echo e(route('unitCategory.insert')); ?>" method="post" style="margin-top: 35px; margin-bottom: 35px;">
                               <?php echo e(csrf_field()); ?>

                               
                                <div class="form-group">
                                    <label for="exampleInputuname" class="col-sm-2 control-label"> Name <span style="color: red">*</span></label>
                                    <div class="col-sm-10">
                                        <div class="input-group" style="width:400px">

                                            <input  type="text" class="form-control" name="name" value="<?php echo e(old('name')); ?>" id="exampleInputuname" placeholder="Enter Name">
                                        <?php if($errors->has('name')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('name')); ?></strong>
                                    </span>
                                <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputuname" class="col-sm-2 control-label"> Amount<span style="color: red">*</span><br> (use percent <input type="checkbox" onclick="percentCheckbox()" name="is_percent" id="is_percent" value="1">)</label>
                                    <div class="col-sm-10">
                                        <div class="input-group" style="width:400px">
                                            <span class="input-group-addon" style="font-size: 12px; padding: 8px" id="amount_input">PKR</span>
                                            <input  type="numeric" class="form-control" name="percent" value="<?php echo e(old('percent')); ?>" id="exampleInputuname" placeholder="Enter Amount">

                                        <?php if($errors->has('percent')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('percent')); ?></strong>
                                    </span>
                                <?php endif; ?>
                                        </div>
                                    </div>
                                </div>

                                <!-- <div class="form-group">
                                    <label for="exampleInputuname" class="col-sm-2 control-label"> Is Percent<span style="color: red">*</span></label>
                                    <div class="col-sm-10">
                                        <div class="input-group" style="width:300px">
                                            <select class="form-control chosen-select" name="is_percent">
                                                <option value="0">NO</option>
                                                <option value="1">YES</option>
                                                
                                            </select>

                                            
                                        <?php if($errors->has('is_percent')): ?>
                                            <span class="help-block">
                                                <strong><?php echo e($errors->first('is_percent')); ?></strong>
                                            </span>
                                        <?php endif; ?>
                                        </div>
                                    </div>
                                </div> -->
                                <div class="form-group m-b-0">
                                <!-- col-sm-offset-3 col-sm-9 -->
                                    <div class="col-sm-offset-3 col-sm-2">
                                        <button type="submit" class="btn btn-info waves-effect waves-light m-t-10" style="width: 100%;">Save</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!--./row-->
            </div>
            <!-- /.container-fluid -->

<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>

    <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/jquery.inputmask.bundle.js"></script>

    <script>

        function percentCheckbox() {

        if($('#is_percent').prop("checked") == false) {
            document.getElementById('amount_input').innerHTML = 'PKR';
        }
        else {
            document.getElementById('amount_input').innerHTML = '%';
        }
    }

    </script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/proje372/akram-city.projecterp.net/resources/views/Setting/unitCategory/add-category.blade.php ENDPATH**/ ?>