<?php $__env->startSection('Title'); ?>پنل مدیریت | ویرایش کاربر<?php $__env->stopSection(); ?>

<?php $__env->startSection('custom-css'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('admin/assets/css/persianDatePicker.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('custom-js'); ?>
    <script src="<?php echo e(asset('admin/assets/js/persian-date.min.js')); ?>"></script>
    <script src="<?php echo e(asset('admin/assets/js/persian-datepicker.min.js')); ?>"></script>
    <script>
        $(".dropify").dropify();
        <?php if($this_user_info['birth_day'] == null || $this_user_info['birth_day'] == ''): ?>
        $('.datePicker').persianDatepicker({
            format: "YYYY/MM/DD",
            viewMode: 'year',
            initialValue: false
        });
        <?php else: ?>
        $('.datePicker').persianDatepicker({
            format: "YYYY/MM/DD",
            viewMode: 'year',
        });
        <?php endif; ?>
    </script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="container-fluid">
        <div class="block-header">
            <div class="row clearfix">
                <div class="col-md-6 col-sm-12">
                    <h1>ویرایش کاربر</h1>
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a href="<?php echo e(route('admin.dashboard')); ?>">
                                    پنل مدیریت
                                </a>
                            </li>
                            <li class="breadcrumb-item active" aria-current="page">ویرایش کاربر</li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>

        <div class="row clearfix">
            <div class="col-12">
                <div class="card">
                    <form enctype="multipart/form-data"
                          action="<?php echo e(route('admin.users.update', ['user_id' => $this_user_info['user_id']])); ?>"
                          method="post"
                          class="card-body">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="col-12 col-sm-6 col-md-3">
                                <div class="row">
                                    <div class="col-12">
                                        <label>تصویر</label>
                                        <?php $__errorArgs = ['profile'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <input type="file" class="dropify" name="profile"
                                               data-default-file="<?php echo e($this_user_info['profile']); ?>">
                                    </div>
                                </div>
                            </div>

                            <div class="col-12 col-sm-6 col-md-9">
                                <div class="row">
                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>نام</label>
                                        <?php $__errorArgs = ['first_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <input type="text" class="form-control" name="first_name"
                                               value="<?php echo e($this_user_info['first_name']); ?>">
                                    </div>

                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>نام خانوادگی</label>
                                        <?php $__errorArgs = ['last_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <input type="text" class="form-control" name="last_name"
                                               value="<?php echo e($this_user_info['last_name']); ?>">
                                    </div>

                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>موبایل</label>
                                        <?php $__errorArgs = ['mobile'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <input type="text" class="form-control" name="mobile"
                                               value="<?php echo e($this_user_info['mobile']); ?>">
                                    </div>

                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>کد ملی</label>
                                        <?php $__errorArgs = ['national_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <input type="text" class="form-control" name="national_code"
                                               value="<?php echo e($this_user_info['national_code']); ?>">
                                    </div>

                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>تاریخ تولد</label>
                                        <?php $__errorArgs = ['birth_day'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <input readonly type="text" class="form-control datePicker whiteReadOnly"
                                               name="birth_day"
                                               value="<?php echo e($this_user_info['birth_day']); ?>">
                                    </div>

                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>جنسیت</label>
                                        <?php $__errorArgs = ['gender'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <select class="form-control" name="gender">
                                            <?php $__currentLoopData = $genders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gender): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option
                                                    <?php if($gender['gender_id'] == $this_user_info['gender']): ?> selected="selected"
                                                    <?php endif; ?> value="<?php echo e($gender['gender_id']); ?>">
                                                    <?php echo e($gender['gender_name']); ?>

                                                </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>

                                    <div class="col-12 col-sm-6 col-md-4 mb-4">
                                        <label>فعال / غیرفعال</label>
                                        <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="validation_label_error"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <select class="form-control" name="status">
                                            <option <?php if($this_user_info['is_active'] == 1): ?> selected="selected" <?php endif; ?>
                                                    value="1">
                                                فعال
                                            </option>
                                            <option <?php if($this_user_info['is_active'] == 0): ?> selected="selected" <?php endif; ?>
                                                    value="0">
                                                غیر فعال
                                            </option>
                                        </select>
                                    </div>
                                </div>

                                <div class="row justify-content-end">
                                    <div class="col-12 col-sm-6 col-md-4">
                                        <button type="submit" class="btn btn-success w-100">
                                            ذخیره تغییرات
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\Xampp\htdocs\base_project\resources\views/admin/users/edit.blade.php ENDPATH**/ ?>