
<?php $__env->startSection('main-content'); ?>
<main>
    <div class="container-fluid">
        <h2 class="mt-5 mb-4">Add Branch</h2>
        <form id="ChangePassForm" action="<?php echo e(url('admin/branch')); ?>" method="post">
            <input type="hidden" name="id" value="<?php echo e(!empty($singleData)? $singleData->id: ''); ?>">
            <?php echo csrf_field(); ?>
            <div class="row">
                <div class="col-md-12">
                    <div class="card card-primary">
                        <div class="card-header">
                            <h6 class="card-title"></h6>
                        </div>
                        <div class="card-body" id="demo">
                            <div class="row">
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Branch Code</label>
                                        <input type="text" class="form-control" name="branch_code" id="name"
                                            value="<?php echo e(!empty($singleData)? $singleData->branch_code:old('branch_code')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['branch_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Branch Name</label>
                                        <input type="text" class="form-control" name="branch_name" id="name"
                                            value="<?php echo e(!empty($singleData)? $singleData->branch_name:old('branch_name')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['branch_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">State</label>
                                        <input type="text" class="form-control" name="state" id="name"
                                            value="<?php echo e(!empty($singleData)? $singleData->state:old('state')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">District</label>
                                        <input type="text" class="form-control" name="district" id="name"
                                            value="<?php echo e(!empty($singleData)? $singleData->district:old('district')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['district'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                                <div class="col-md-12"></div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Branch Contact Person</label>
                                        <input type="text" class="form-control" name="branch_contact_person" id="name"
                                            value="<?php echo e(!empty($singleData)? $singleData->branch_contact_person:old('branch_contact_person')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['branch_contact_person'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Branch Contact Number</label>
                                        <input type="number" class="form-control" name="branch_contact_number" id="name"
                                            value="<?php echo e(!empty($singleData)? $singleData->branch_contact_number:old('branch_contact_number')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['branch_contact_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Branch Email ID</label>
                                        <input type="email" class="form-control" name="email" id="email"
                                            value="<?php echo e(!empty($singleData)? $singleData->email:old('email')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Branch Address</label>
                                        <input type="text" class="form-control" name="branch_address" id="email"
                                            value="<?php echo e(!empty($singleData)? $singleData->branch_address:old('branch_address')); ?>">
                                    </div>
                                    <?php $__errorArgs = ['branch_address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Password</label>
                                        <input type="password" id="myInput" class="form-control" name="password"
                                            id="password"
                                            value="<?php echo e(!empty($singleData)? $singleData->view_password:old('password')); ?>">

                                        <input type="checkbox" onclick="myFunction()" style="margin-top: 5px;;"> Show
                                        Password
                                    </div>
                                    <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                </div>

                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">Confirm Password</label>
                                        <input type="password" class="form-control" name="confirm_password"
                                            id="confirm_password" onkeypress="ConPass()"
                                            value="<?php echo e(!empty($singleData)? $singleData->view_password:old('confirm_password')); ?>">
                                    </div>

                                    <?php $__errorArgs = ['confirm_password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <p style="color: red"><?php echo e($message); ?></p>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <br><br>
                                        <input type="checkbox" name="status" value="1" <?php echo e(!empty($singleData) && $singleData->status==1? 'checked' : ''); ?>> Active/Inactive
                                     </div>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="inputName">&nbsp;</label>
                                        <div class="clear"></div>
                                        <input type="Submit" value="Submit" class="btn btn-success"
                                            onclick="Validation()">
                                    </div>

                                </div>
                            </div>
                        </div>
                        <!-- /.card-body -->
                    </div>
                    <!-- /.card -->

                    <!-- end -->
                </div>
            </div>
        </form>
    </div>
</main>

<?php $__env->stopSection(); ?>
<script>
    function myFunction() {
  var x = document.getElementById("myInput");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}
</script>
<?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/aks5g/public_html/aadhar.aks.5g.in/resources/views/admin/add-branch.blade.php ENDPATH**/ ?>