<?php $__env->startSection('title','Edit Profil'); ?>

<?php $__env->startSection('vendor-styles'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('css/plugins/forms/validation/form-validation.css')); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('vendors/css/forms/select/select2.min.css')); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('vendors/css/pickers/pickadate/pickadate.css')); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('vendors/css/pickers/daterange/daterangepicker.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-styles'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('css/pages/page-users.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<!-- users edit start -->
<section class="users-edit">
    <?php if($user->profil->tempat_lahir === NULL): ?>
        <div class="alert alert-warning alert-dismissible mb-2" role="alert">   
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <div class="d-flex align-items-center">
                <i class="bx bx-error"></i>
                <span>
                    Lengkapi biodata terlebih dahulu sebelum melakukan pengajuan surat!
                </span>
            </div>
        </div>
    <?php endif; ?>
    <div class="alert alert-warning alert-dismissible mb-2" role="alert">   
        <div class="d-flex align-items-center">
            <i class="bx bx-error"></i>
            <span>
                Data profil harus sama dengan data KTP!
            </span>
        </div>
    </div>

    <div class="card">
        <div class="card-content">
        <div class="card-body">
            <form method="post" action="<?php echo e(route('profil.update')); ?>" autocomplete="off" class="form" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <?php echo method_field('put'); ?>
                <div class="media mb-1">
                    <a class="mr-2" href="#">
                        <?php if(auth()->user()->profil->foto === NULL): ?>
                            <img src="<?php echo e(asset('storage/Profil/default.png')); ?>" alt="users avatar"
                                class="users-avatar-shadow rounded-circle" height="64" width="64">
                        <?php else: ?> 
                            <img src="<?php echo e(asset('storage/'.$user->profil->foto)); ?>" alt="users avatar"
                                class="users-avatar-shadow rounded-circle" height="64" width="64">                        
                        <?php endif; ?>
                    </a>
                    <div class="media-body">
                        <h5 class="media-heading">Foto Profil</h5>
                        <div class="col-12 col-lg-2 px-0 d-flex">
                            <div class="form-group">
                                <div class="controls">
                                    <div class="custom-file">
                                            <input type="file" class="form-control <?php $__errorArgs = ['foto'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> custom-file-input" id="foto" name="foto">
                                            <label class="custom-file-label" for="inputGroupFile01">Pilih foto</label>
                                        </div>
                                    <?php if($errors->has('foto')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('foto')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                                </div>
                            </div>    
                        </div>
                    </div>
                                            
                </div>
                <div class="row">
                    <div class="col-12">
                        <div class="form-group">
                            <div class="controls">
                                <label>NIK</label>
                                <input type="text" name="nik" id="nik" class="form-control" placeholder="NIK"
                                    value="<?php echo e($user->nik); ?>" readonly>
                                    <small class="text-warning">Hubungi admin untuk mengubah NIK.</small>
                                    <?php if($errors->has('nik')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('nik')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>No. KK</label>
                                <input type="text" id="no_kk" minlength="16" maxlength="16" class="form-control <?php $__errorArgs = ['no_kk'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="no_kk" placeholder="No. KK" 
                                    value="<?php echo e($user->profil->no_kk, old('no_kk')); ?>" required
                                    data-validation-required-message="Nomor KK wajib diisi."
                                    data-validation-containsnumber-regex="(\d)+"
                                    data-validation-containsnumber-message="Masukkan Nomor yang valid."
                                    data-validation-minlength-message="Harus terdiri dari minimal 10 karakter."
                                    data-validation-maxlength-message="Harus terdiri dari maksimal 15 karakter.">
                                    <?php if($errors->has('no_kk')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('no_kk')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Nama</label>
                                <input type="text" name="name" minlength="3" id="name" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Nama"
                                    value="<?php echo e($user->name, old('name')); ?>" required
                                    data-validation-required-message="Nama wajib diisi."
                                    data-validation-minlength-message="Harus terdiri dari minimal 3 karakter.">
                                    <?php if($errors->has('name')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('name')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label class="d-block">Jenis Kelamin</label>
                                <div class="custom-control-inline">
                                    <div class="radio mr-1">
                                        <input type="radio" name="jenis_kelamin" id="radio1" class="form-control  <?php $__errorArgs = ['jenis_kelamin'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" value="Laki-Laki" required
                                            <?php echo e(($user->profil->jenis_kelamin) == 'Laki-Laki' ? 'checked' : ''); ?> >
                                        <label for="radio1">Laki-Laki</label>
                                    </div>
                                    <div class="radio">
                                        <input type="radio" name="jenis_kelamin" id="radio2" class="form-control  <?php $__errorArgs = ['jenis_kelamin'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" value="Perempuan" required
                                            <?php echo e(($user->profil->jenis_kelamin) == 'Perempuan' ? 'checked' : ''); ?>>
                                        <label for="radio2">Perempuan</label>
                                    </div>
                                    <?php if($errors->has('jenis_kelamin')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('jenis_kelamin')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Tempat Lahir</label>
                                <input type="text" name="tempat_lahir" minlength="3" id="tempat_lahir" class="form-control  <?php $__errorArgs = ['tempat_lahir'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Tempat Lahir"
                                    value="<?php echo e($user->profil->tempat_lahir, old('tempat_lahir')); ?>" required
                                    data-validation-required-message="Tempat Lahir wajib diisi."
                                    data-validation-minlength-message="Harus terdiri dari minimal 3 karakter.">
                                    <?php if($errors->has('tempat_lahir')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('tempat_lahir')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group position-relative has-icon-left">
                            <div class="controls">
                                <label>Tanggal Lahir</label>
                                <input type="text" name="tanggal_lahir" class="form-control <?php $__errorArgs = ['tanggal_lahir'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> pickadate-profil" value="<?php echo e($user->profil->tanggal_lahir); ?>" placeholder="Pilih Tanggal" required>
                                <div class="form-control-position">
                                    <i class='bx bx-calendar' style="top: 24px"></i>
                                </div>
                                <?php if($errors->has('tanggal_lahir')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('tanggal_lahir')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Agama</label>
                                <select class="select2 form-control <?php $__errorArgs = ['agama'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="agama" name="agama" required>
                                    <option value="" selected disabled>Pilih Agama</option>
                                    <option <?php echo e(($user->profil->agama) == 'Islam' ? 'selected' : ''); ?> value="Islam">Islam</option>
                                    <option <?php echo e(($user->profil->agama) == 'Katolik' ? 'selected' : ''); ?> value="Katolik">Katolik</option>
                                    <option <?php echo e(($user->profil->agama) == 'Kristen' ? 'selected' : ''); ?> value="Kristen">Kristen</option>
                                    <option <?php echo e(($user->profil->agama) == 'Hindu' ? 'selected' : ''); ?> value="Hindu">Hindu</option>
                                    <option <?php echo e(($user->profil->agama) == 'Budha' ? 'selected' : ''); ?> value="Budha">Budha</option>
                                    <option <?php echo e(($user->profil->agama) == 'Konghucu' ? 'selected' : ''); ?> value="Konghucu">Konghucu</option>
                                    <option <?php echo e(($user->profil->agama) == 'ILainnyaslam' ? 'selected' : ''); ?> value="Lainnya">Lainnya</option>
                                </select>
                                <?php if($errors->has('agama')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('agama')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Alamat</label>
                                <textarea class="form-control <?php $__errorArgs = ['alamat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="alamat" id="alamat" rows="4" required><?php echo e($user->profil->alamat); ?></textarea>                            
                                <?php if($errors->has('alamat')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('alamat')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>RT</label>
                                <input type="text" id="rt" minlength="1" maxlength="4" class="form-control <?php $__errorArgs = ['rt'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="rt" placeholder="RT" 
                                    value="<?php echo e($user->profil->rt, old('rt')); ?>" required
                                    data-validation-required-message="RT wajib diisi."
                                    data-validation-containsnumber-regex="(\d)+"
                                    data-validation-containsnumber-message="Masukkan RT yang valid."
                                    data-validation-minlength-message="Harus terdiri dari minimal 1 karakter."
                                    data-validation-maxlength-message="Harus terdiri dari maksimal 4 karakter.">
                                    <?php if($errors->has('rt')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('rt')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>RW</label>
                                <input type="text" id="rw" minlength="1" maxlength="4" class="form-control <?php $__errorArgs = ['rw'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="rw" placeholder="RW" 
                                    value="<?php echo e($user->profil->rw, old('rw')); ?>" required
                                    data-validation-required-message="RW wajib diisi."
                                    data-validation-containsnumber-regex="(\d)+"
                                    data-validation-containsnumber-message="Masukkan RW yang valid."
                                    data-validation-minlength-message="Harus terdiri dari minimal 1 karakter."
                                    data-validation-maxlength-message="Harus terdiri dari maksimal 4 karakter.">
                                    <?php if($errors->has('rw')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('rw')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Provinsi</label>
                                <select class="select2 form-control <?php $__errorArgs = ['provinsi'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="provinsi" name="provinsi" required>
                                    <option value="" selected disabled>Pilih Provinsi</option>
                                    <?php $__currentLoopData = $provinces; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php echo e($item->id == $user->profil->provinsi ? "selected" : ""); ?> value="<?php echo e($item->id ?? ''); ?>"><?php echo e($item->name ?? ''); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <?php if($errors->has('provinsi')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('provinsi')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Kabupaten / Kota</label>
                                <select class="select2 form-control <?php $__errorArgs = ['kabupaten_kota'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="kabupaten_kota" name="kabupaten_kota" required>
                                    <option value="" selected disabled>Pilih Kabupaten / Kota</option>
                                    <?php if($user->profil->kabupaten_kota): ?>
                                    <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php echo e($item->id == $user->profil->kabupaten_kota ? "selected" : ""); ?> value="<?php echo e($item->id ?? ''); ?>"><?php echo e($item->name ?? ''); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                </select>
                                <?php if($errors->has('kabupaten_kota')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('kabupaten_kota')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Kecamatan</label>
                                <select class="select2 form-control <?php $__errorArgs = ['kecamatan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="kecamatan" name="kecamatan" required>
                                    <option value="" selected disabled>Pilih Kecamatan</option>
                                    <?php if($user->profil->kecamatan): ?>
                                    <?php $__currentLoopData = $districts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php echo e($item->id == $user->profil->kecamatan ? "selected" : ""); ?> value="<?php echo e($item->id ?? ''); ?>"><?php echo e($item->name ?? ''); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                </select>
                                <?php if($errors->has('kecamatan')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('kecamatan')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Desa / Kelurahan</label>
                                <select class="select2 form-control <?php $__errorArgs = ['desa_kelurahan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="desa_kelurahan" name="desa_kelurahan" required>
                                    <option value="" selected disabled>Pilih Desa / Kelurahan</option>
                                    <?php if($user->profil->desa_kelurahan): ?>
                                    <?php $__currentLoopData = $villages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php echo e($item->id == $user->profil->desa_kelurahan ? "selected" : ""); ?> value="<?php echo e($item->id ?? ''); ?>"><?php echo e($item->name ?? ''); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                </select>
                                <?php if($errors->has('desa_kelurahan')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('desa_kelurahan')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Kode Pos</label>
                                <input type="text" id="kode_pos" minlength="4" maxlength="6" class="form-control <?php $__errorArgs = ['kode_pos'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="kode_pos" placeholder="Kode Pos" 
                                    value="<?php echo e($user->profil->kode_pos, old('kode_pos')); ?>" required
                                    data-validation-required-message="Kode Pos wajib diisi."
                                    data-validation-containsnumber-regex="(\d)+"
                                    data-validation-containsnumber-message="Masukkan Kode Pos yang valid."
                                    data-validation-minlength-message="Harus terdiri dari minimal 5 karakter."
                                    data-validation-maxlength-message="Harus terdiri dari maksimal 6 karakter.">
                                    <?php if($errors->has('kode_pos')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('kode_pos')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Kewarganegaraan</label>
                                <input type="text" name="kewarganegaraan" minlength="3" id="kewarganegaraan" class="form-control  <?php $__errorArgs = ['kewarganegaraan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Kewarganegaraan"
                                    value="<?php echo e($user->profil->kewarganegaraan); ?>" readonly
                                    data-validation-required-message="Kewarganegaraan wajib diisi."
                                    data-validation-minlength-message="Harus terdiri dari minimal 3 karakter.">
                                    <?php if($errors->has('kewarganegaraan')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('kewarganegaraan')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>No. Telepon</label>
                                <input type="text" id="telepon" minlength="10" maxlength="15" class="form-control <?php $__errorArgs = ['telepon'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="telepon" placeholder="No. Telepon" 
                                    value="<?php echo e($user->profil->telepon, old('telepon')); ?>" required
                                    data-validation-required-message="Nomor Telepon wajib diisi."
                                    data-validation-containsnumber-regex="(\d)+"
                                    data-validation-containsnumber-message="Masukkan Nomor yang valid."
                                    data-validation-minlength-message="Harus terdiri dari minimal 10 karakter."
                                    data-validation-maxlength-message="Harus terdiri dari maksimal 15 karakter.">
                                    <?php if($errors->has('telepon')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('telepon')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Pekerjaan Anda</label>
                                <input type="text" name="pekerjaan" minlength="3" id="pekerjaan" class="form-control <?php $__errorArgs = ['pekerjaan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Pekerjaan"
                                    value="<?php echo e($user->profil->pekerjaan); ?>" required
                                    data-validation-required-message="Pekerjaan wajib diisi."
                                    data-validation-minlength-message="Harus terdiri dari minimal 3 karakter.">
                                    <?php if($errors->has('pekerjaan')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('pekerjaan')); ?></li>
                                        </ul>
                                    </div>
                                    <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Status Perkawinan</label>
                                <select class="select2 form-control <?php $__errorArgs = ['status_perkawinan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="status_perkawinan" name="status_perkawinan" required>
                                    <option value="" selected disabled>Pilih Status Perkawinan</option>
                                    <option <?php echo e(($user->profil->status_perkawinan) == 'MENIKAH' ? 'selected' : ''); ?> value="MENIKAH">MENIKAH</option>
                                    <option <?php echo e(($user->profil->status_perkawinan) == 'BELUM MENIKAH' ? 'selected' : ''); ?> value="BELUM MENIKAH">BELUM MENIKAH</option>
                                    <option <?php echo e(($user->profil->status_perkawinan) == 'JANDA/DUDA' ? 'selected' : ''); ?> value="JANDA/DUDA">JANDA/DUDA</option>
                                </select>
                                <?php if($errors->has('status_perkawinan')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('status_perkawinan')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Golongan Darah</label>
                                <select class="select2 form-control <?php $__errorArgs = ['golongan_darah'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="golongan_darah" name="golongan_darah" class="form-control" required>
                                    <option value="" selected disabled>Pilih Golongan Darah</option>
                                    <option <?php echo e(($user->profil->golongan_darah) == 'A' ? 'selected' : ''); ?> value="A">A</option>
                                    <option <?php echo e(($user->profil->golongan_darah) == 'B' ? 'selected' : ''); ?> value="B">B</option>
                                    <option <?php echo e(($user->profil->golongan_darah) == 'AB' ? 'selected' : ''); ?> value="AB">AB</option>
                                    <option <?php echo e(($user->profil->golongan_darah) == 'O' ? 'selected' : ''); ?> value="O">O</option>
                                    <option <?php echo e(($user->profil->golongan_darah) == '-' ? 'selected' : ''); ?> value="-">-</option>
                                </select>
                                <?php if($errors->has('golongan_darah')): ?>
                                    <div class="help-block text-danger">
                                        <ul role="alert">
                                            <li><?php echo e($errors->first('golongan_darah')); ?></li>
                                        </ul>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 d-flex flex-sm-row flex-column justify-content-start mt-1">
                        <button type="submit" class="btn btn-danger glow mb-1 mb-sm-0 mr-0 mr-sm-1">Simpan</button>
                        <button type="reset" class="btn btn-light">Cancel</button>
                    </div>
                </div>
            </form>
        </div>
        </div>
    </div>
</section>
<!-- users edit ends -->
<?php $__env->stopSection(); ?>


<?php $__env->startSection('vendor-scripts'); ?>
<script>
    function onChangeSelect(url, id, name) {
        // send ajax request to get the cities of the selected province and append to the select tag
        $.ajax({
            url: url,
            type: 'GET',
            data: {
                id: id
            },
            success: function (data) {
                $('#' + name).empty();
                $('#' + name).append('<option>Pilih Salah Satu</option>');

                $.each(data, function (key, value) {
                    $('#' + name).append('<option value="' + key + '">' + value + '</option>');
                });
            }
        });
    }
    $(function () {
        $('#provinsi').on('change', function () {
            onChangeSelect('<?php echo e(route("cities")); ?>', $(this).val(), 'kabupaten_kota');
        });
        $('#kabupaten_kota').on('change', function () {
            onChangeSelect('<?php echo e(route("districts")); ?>', $(this).val(), 'kecamatan');
        })
        $('#kecamatan').on('change', function () {
            onChangeSelect('<?php echo e(route("villages")); ?>', $(this).val(), 'desa_kelurahan');
        })
    });
</script>
<script src="<?php echo e(asset('vendors/js/forms/select/select2.full.min.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/forms/validation/jqBootstrapValidation.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/pickers/pickadate/picker.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/pickers/pickadate/picker.date.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/pickers/pickadate/picker.time.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/pickers/pickadate/legacy.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/pickers/daterange/moment.min.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/js/pickers/daterange/daterangepicker.js')); ?>"></script>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('page-scripts'); ?>
<script src="<?php echo e(asset('js/scripts/forms/select/form-select2.js')); ?>"></script>
<script src="<?php echo e(asset('js/scripts/pages/page-users.js')); ?>"></script>
<script src="<?php echo e(asset('js/scripts/navs/navs.js')); ?>"></script>
<script src="<?php echo e(asset('js/scripts/forms/validation/form-validation.js')); ?>"></script>
<script src="<?php echo e(asset('js/scripts/pickers/dateTime/pick-a-datetime.js')); ?>"></script>   
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.contentLayoutMaster', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/mac/laravel-projects/wagom/resources/views/profil/index.blade.php ENDPATH**/ ?>