

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

<?php $__env->startSection('content'); ?>
    <h3 class="mb-4">Edit Programme</h3>

    <?php if($errors->any()): ?>
        <div class="alert alert-danger">
            <ul class="mb-0">
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
    <?php endif; ?>

    <form action="<?php echo e(route('admin.programmes.update', $programme->id)); ?>" method="POST">
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>

        <div class="mb-3">
            <label class="form-label">Programme Code</label>
            <input type="text" name="programme_code" class="form-control" value="<?php echo e($programme->programme_code); ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Description</label>
            <input type="text" name="description" class="form-control" value="<?php echo e($programme->description); ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Total Credits</label>
            <input type="number" name="total_credits" class="form-control" value="<?php echo e($programme->total_credits); ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Duration</label>
            <input type="text" name="duration" class="form-control" value="<?php echo e($programme->duration); ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Attendance Mode</label>
            <input type="text" name="attendance_mode" class="form-control" value="<?php echo e($programme->attendance_mode); ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Status</label>
            <select name="status" class="form-select" required>
                <option value="active" <?php echo e($programme->status === 'active' ? 'selected' : ''); ?>>Active</option>
                <option value="inactive" <?php echo e($programme->status === 'inactive' ? 'selected' : ''); ?>>Inactive</option>
            </select>
        </div>

        <button type="submit" class="btn btn-primary">Update Programme</button>
        <a href="<?php echo e(route('admin.programmes.index')); ?>" class="btn btn-secondary">Cancel</a>
    </form>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\studentportal\resources\views/admin/programmes/edit.blade.php ENDPATH**/ ?>