
<?php $__env->startSection('content'); ?>
<div class="app-title">
    <div>
        <h1>
            <i class="fa-regular fa-plus mx-1"></i> Add Prayer Sub Category
        </h1>
    </div>
</div>
<!-- div for top tittle end here -->
<!-- page content start from here -->
<section class="acc-form">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-8 col-sm-12 col-xs-12 col-md-8">
                <div class="tile">
                    <div class="tile-body">
                        <!-- form start from here -->
                        <form class="emp-master-form" action="<?php echo e(route('admin.store_prayer_sub_category')); ?>" method="POST" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div class="row">

                                <div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
                                    <div class="form-group">
                                        <label class="form-head mb-1" for="options">Prayer Category:</label>
                                        <select id="options" name="prayer_category_id" class="form-control">
                                            <option value="" disabled <?php echo e(old('prayer_category_id') ? '' : 'selected'); ?>>Select Prayer Category</option>
                                            <?php $__currentLoopData = $prayer_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $prayer_category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($prayer_category->id); ?>" <?php echo e(old('prayer_category_id') == $prayer_category->id ? 'selected' : ''); ?>>
                                                <?php echo e($prayer_category->prayer_category_name); ?>

                                            </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                    <?php $__errorArgs = ['prayer_category_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger mt-1"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                <!-- Prayer Sub-Category Dropdown -->
                                <div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
                                    <div class="form-group">
                                        <label class="form-head mb-1" for="prayer_sub_cat_name">Sub-Catergory Name:</label>
                                        <input class="form-control" name="prayer_sub_cat_name" id="prayer_sub_cat_name" placeholder="Enter Prayer Sub-Category Name" value="<?php echo e(old('prayer_sub_cat_name')); ?>"></input>
                                    </div>
                                    <?php $__errorArgs = ['prayer_sub_cat_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger mt-1"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                <div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 mt-2 mb-2">
                                    <div class="form-group">
                                        <label class="form-head mb-1" for="prayer_sub_cat_description">Sub-Catergory Description:</label>
                                        <textarea class="form-control" name="prayer_sub_cat_description" id="prayer_sub_cat_description" placeholder="Enter Sub-Catergory Description" value="<?php echo e(old('prayer_sub_cat_description')); ?>"></textarea>
                                    </div>
                                    <?php $__errorArgs = ['prayer_sub_cat_description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger mt-1"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12 mt-4 mb-2">
                                    <div class="form-group text-center">
                                        <button class="btn submit-btn w-100" type="submit">
                                            <i class="fa-sharp fa-light fa-paper-plane mx-2"></i> Add Prayer Sub-Category </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- fom end here -->
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

<?php if(session('success')): ?>
<script>
    Swal.fire({
        icon: 'success',
        title: 'Success!',
        text: "<?php echo e(session('success')); ?>",
        confirmButtonText: 'OK'
    }).then((result) => {
        if (result.isConfirmed) {
            window.location.href = "<?php echo e(route('admin.prayer_sub_category')); ?>";
        }
    });
</script>
<?php endif; ?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/pragyadbtechserv/public_html/church-admin/resources/views/admin/add_prayer_sub_category.blade.php ENDPATH**/ ?>