<?php $__env->startSection('title'); ?> <?php if( ! empty($title)): ?> <?php echo e($title); ?> | <?php endif; ?> ##parent-placeholder-3c6de1b7dd91465d437ef415f94f36afc1fbc8a8## <?php $__env->stopSection(); ?>

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

<?php echo $__env->make('admin.sidebar_menu', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<div id="page-wrapper">
    <?php if( ! empty($title)): ?>
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header"> <?php echo e($title); ?> </h1>
        </div> <!-- /.col-lg-12 -->
    </div> <!-- /.row -->
    <?php endif; ?>

    <?php echo $__env->make('admin.flash_msg', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

    <div class="row">
        <div class="col-xs-12">

            <?php echo Form::open(['class'=>'form-horizontal', 'files'=>'true']); ?>

            <?php if(session('missing_mobile')): ?>
            <div class="form-group bg-danger" style="padding:10px 0;">
                <div class="col-sm-8">
                    <p class="help-block"><?php echo e(session('missing_mobile')); ?></p>
                </div>
            </div>
            <?php endif; ?>
            <div class="form-group <?php echo e($errors->has('name')? 'has-error':''); ?>">
                <label for="name" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.name'); ?></label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="name"
                        value="<?php echo e(old('name')? old('name') : $user->name); ?>" name="name"
                        placeholder="<?php echo app('translator')->getFromJson('app.name'); ?>">
                    <?php echo $errors->has('name')? '<p class="help-block">'.$errors->first('name').'</p>':''; ?>

                </div>
            </div>

            <div class="form-group <?php echo e($errors->has('email')? 'has-error':''); ?>">
                <label for="email" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.email'); ?></label>
                <div class="col-sm-8">
                    <input type="email" class="form-control" id="email"
                        value="<?php echo e(old('email')? old('email') : $user->email); ?>" name="email"
                        placeholder="<?php echo app('translator')->getFromJson('app.email'); ?>" readonly>
                    <?php echo $errors->has('email')? '<p class="help-block">'.$errors->first('email').'</p>':''; ?>

                </div>
            </div>

            <div class="form-group <?php echo e($errors->has('gender')? 'has-error':''); ?>">
                <label for="gender" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.gender'); ?></label>
                <div class="col-sm-8">
                    <select id="gender" name="gender" class="form-control select2">
                        <option value="">Select Gender</option>
                        <option value="male" <?php echo e($user->gender == 'male'?'selected':''); ?>>Male</option>
                        <option value="female" <?php echo e($user->gender == 'female'?'selected':''); ?>>Fe-Male</option>
                        <option value="third_gender" <?php echo e($user->gender == 'third_gender'?'selected':''); ?>>Third Gender
                        </option>
                    </select>

                    <?php echo $errors->has('gender')? '<p class="help-block">'.$errors->first('gender').'</p>':''; ?>

                </div>
            </div>

            <!--<div class="form-group <?php echo e($errors->has('mobile')? 'has-error':''); ?>">-->
            <!--    <label for="mobile" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.mobile'); ?></label>-->
            <!--    <div class="col-sm-8">-->
            <!--        <input type="text" class="form-control" id="mobile"-->
            <!--            value="<?php echo e(old('mobile')? old('mobile') : $user->mobile); ?>" name="mobile"-->
            <!--            placeholder="<?php echo app('translator')->getFromJson('app.mobile'); ?>">-->
            <!--        <?php echo $errors->has('mobile')? '<p class="help-block">'.$errors->first('mobile').'</p>':''; ?>-->
            <!--    </div>-->
            <!--</div>-->

            <div class="form-group <?php echo e($errors->has('phone')? 'has-error':''); ?>">
                <label for="phone" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.phone'); ?></label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="phone"
                        value="<?php echo e(old('phone')? old('phone') : $user->phone); ?>" name="phone"
                        placeholder="<?php echo app('translator')->getFromJson('app.phone'); ?>">
                    <?php echo $errors->has('phone')? '<p class="help-block">'.$errors->first('phone').'</p>':''; ?>

                </div>
            </div>


            <div>


                <div class="form-group <?php echo e($errors->has('address')? 'has-error':''); ?>">
                    <label for="address" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.address'); ?></label>
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="address"
                            value="<?php echo e(old('address')? old('address') : $user->address); ?>" name="address"
                            placeholder="<?php echo app('translator')->getFromJson('app.address'); ?>">
                        <p>
                            <?php echo $errors->has('address')? '<p class="help-block">'.$errors->first('address').'</p>':''; ?>

                    </div>
                </div>
                
                <div class="form-group <?php echo e($errors->has('website')? 'has-error':''); ?>">
                    <label for="website" class="col-sm-4 control-label">Website</label>
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="website"
                            value="<?php echo e(old('website')? old('website') : $user->website); ?>" name="website"
                            placeholder="Website">
                        <p>
                            <?php echo $errors->has('address')? '<p class="help-block">'.$errors->first('website').'</p>':''; ?>

                    </div>
                </div>



                <div class="form-group  <?php echo e($errors->has('photo')? 'has-error':''); ?>">
                    <label class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.change_avatar'); ?></label>
                    <div class="col-sm-8">
                        <input type="file" id="photo" name="photo" class="filestyle">
                        <p>
                            <?php echo $errors->has('photo')? '<p class="help-block">'.$errors->first('photo').'</p>':''; ?>

                        </p>
                    </div>
                </div>
                <?php if(Auth::user()->user_type == 'agent'): ?>
                <?php
                $user_paper = App\Agent_legality::where('user_id', $user->id)->first();
                ?>


                <div class="form-group  <?php echo e($errors->has('certificate')? 'has-error':''); ?>">
                    <label class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('Certificate'); ?></label>
                    <div class="col-sm-8">
                        <input type="file" id="photo" name="certificate" class="filestyle">
                        <p>
                            <?php echo $errors->has('photo')? '<p class="help-block">'.$errors->first('photo').'</p>':''; ?>

                        </p>
                    </div>
                    <?php if(isset($user_paper)): ?> <h5><?php echo e($user_paper->agent_certificate); ?></h5> <?php endif; ?>
                    <h5></h5>
                </div>

                <hr />
                <div class="form-group">
                    <label for="membership-num" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('Membership Number'); ?></label>
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="" name="membershipNum"
                            placeholder="<?php echo app('translator')->getFromJson('Membership Number'); ?>" <?php if(isset($user_paper)): ?>
                            value="<?php echo e($user_paper->membership_num); ?>" <?php endif; ?>>
                        <p>
                            <?php echo $errors->has('membership-num')? '<p class="help-block">
                                '.$errors->first('membership-num').'</p>':''; ?>

                    </div>
                </div>

                <div class="form-group">
                    <label for="membership-name" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('Membership Name'); ?></label>
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="" name="membershipName"
                            placeholder="<?php echo app('translator')->getFromJson('Membership Name'); ?>" <?php if(isset($user_paper)): ?>
                            value="<?php echo e($user_paper->membership_name); ?>" <?php endif; ?>>
                        <p>
                            <?php echo $errors->has('membership-name')? '<p class="help-block">
                                '.$errors->first('membership-name').'</p>':''; ?>

                    </div>
                </div>
                <?php endif; ?>

                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-4">
                        <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('Update'); ?></button>
                    </div>
                </div>

                <?php echo Form::close(); ?>


            </div>
        </div>

    </div> <!-- /#page-wrapper -->

</div> <!-- /#wrapper -->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-js'); ?>
<script src="<?php echo e(asset('assets/js/bootstrap-filestyle.min.js')); ?>"></script>
<script>
    $(":file").filestyle({buttonName: "btn-primary", buttonBefore: true});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.main', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>