

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

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

<div class="container-fluid">

    
    <div class="d-flex justify-content-between align-items-center mb-4">

        <div>

            <h3 class="font-weight-bold mb-1">
                Edit Data Guru
            </h3>

            <p class="text-muted mb-0">
                Perbarui informasi data guru.
            </p>

        </div>

        <a href="<?php echo e(route('guru.index')); ?>"
           class="btn btn-secondary btn-modern">

            <i class="bi bi-arrow-left-circle mr-1"></i>

            Kembali

        </a>

    </div>

    <form action="<?php echo e(route('guru.update',$guru->id)); ?>"
          method="POST">

        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>

        <div class="card card-modern">

            <div class="card-header bg-white border-0">

                <h5 class="mb-0">

                    <i class="bi bi-pencil-square text-warning mr-2"></i>

                    Form Edit Guru

                </h5>

            </div>

            <div class="card-body">

                <div class="row">

                    
                    <div class="col-md-6 mb-3">

                        <label>NIP</label>

                        <div class="input-group">

                            <div class="input-group-prepend">

                                <span class="input-group-text">

                                    <i class="bi bi-credit-card-2-front"></i>

                                </span>

                            </div>

                            <input
                                type="text"
                                name="nip"
                                value="<?php echo e(old('nip',$guru->nip)); ?>"
                                class="form-control <?php $__errorArgs = ['nip'];
$__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); ?>">

                            <?php $__errorArgs = ['nip'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="invalid-feedback">
                                    <?php echo e($message); ?>

                                </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                        </div>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Nama Guru</label>

                        <div class="input-group">

                            <div class="input-group-prepend">

                                <span class="input-group-text">

                                    <i class="bi bi-person"></i>

                                </span>

                            </div>

                            <input
                                type="text"
                                name="nama"
                                value="<?php echo e(old('nama',$guru->nama)); ?>"
                                class="form-control <?php $__errorArgs = ['nama'];
$__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); ?>">

                            <?php $__errorArgs = ['nama'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="invalid-feedback">
                                    <?php echo e($message); ?>

                                </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                        </div>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Email</label>

                        <div class="input-group">

                            <div class="input-group-prepend">

                                <span class="input-group-text">

                                    <i class="bi bi-envelope"></i>

                                </span>

                            </div>

                            <input
                                type="email"
                                name="email"
                                value="<?php echo e(old('email',$guru->email)); ?>"
                                class="form-control">

                        </div>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Password Baru</label>

                        <div class="input-group">

                            <div class="input-group-prepend">

                                <span class="input-group-text">

                                    <i class="bi bi-lock"></i>

                                </span>

                            </div>

                            <input
                                type="password"
                                name="password"
                                class="form-control"
                                placeholder="Kosongkan jika tidak diganti">

                        </div>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Jenis Kelamin</label>

                        <select
                            name="jk"
                            class="form-control modern-select">

                            <option value="L"
                                <?php echo e($guru->jk=='L'?'selected':''); ?>>
                                Laki-laki
                            </option>

                            <option value="P"
                                <?php echo e($guru->jk=='P'?'selected':''); ?>>
                                Perempuan
                            </option>

                        </select>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Status Guru</label>

                        <select
                            name="status"
                            class="form-control modern-select">

                            <option value="Tetap"
                                <?php echo e($guru->status=='Tetap'?'selected':''); ?>>
                                Guru Tetap
                            </option>

                            <option value="Honorer"
                                <?php echo e($guru->status=='Honorer'?'selected':''); ?>>
                                Guru Honorer
                            </option>

                        </select>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Tarif Per Jam</label>

                        <div class="input-group">

                            <div class="input-group-prepend">

                                <span class="input-group-text">

                                    Rp

                                </span>

                            </div>

                            <input
                                type="number"
                                name="tarif_per_jam"
                                value="<?php echo e(old('tarif_per_jam',$guru->tarif_per_jam)); ?>"
                                class="form-control">

                        </div>

                    </div>

                    
                    <div class="col-md-6 mb-3">

                        <label>Tanggal Masuk</label>

                        <input
                            type="date"
                            name="tanggal_masuk"
                            value="<?php echo e(old('tanggal_masuk',$guru->tanggal_masuk)); ?>"
                            class="form-control">

                    </div>

                </div>

            </div>

            <div class="card-footer bg-white">

                <button
                    class="btn btn-warning btn-modern">

                    <i class="bi bi-check-circle-fill mr-1"></i>

                    Update Data

                </button>

                <a href="<?php echo e(route('guru.index')); ?>"
                   class="btn btn-light btn-modern">

                    Batal

                </a>

            </div>

        </div>

    </form>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\Presguru\resources\views/guru/edit.blade.php ENDPATH**/ ?>