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



<link href="<?php echo e(asset('assets/css/vendor/quill.core.css')); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo e(asset('assets/css/vendor/quill.snow.css')); ?>" rel="stylesheet" type="text/css" />




<div class="container mt-2">
		<?php $__env->startComponent('components.breadcrumb'); ?>
            <?php $__env->slot('title'); ?>
                <?php echo app('translator')->get('principle.edittitle'); ?>
            <?php $__env->endSlot(); ?>
            <?php $__env->slot('breadcrumb1'); ?>
                <?php echo app('translator')->get('common.dashboard'); ?>
            <?php $__env->endSlot(); ?>
            <?php $__env->slot('breadcrumb1_link'); ?>
                <?php echo e(route('dashboard')); ?>

            <?php $__env->endSlot(); ?>
            <?php if(\App\Traits\RolePermissionTrait::checkRoleHasPermission('role', 'create')): ?>
                <?php $__env->slot('action_button1'); ?>
                  <i class="fa fa-eye"></i>  <?php echo app('translator')->get('common.view'); ?>
                <?php $__env->endSlot(); ?>
                <?php $__env->slot('action_button1_link'); ?>
                    <?php echo e(route('principle.index')); ?>

                <?php $__env->endSlot(); ?>
            <?php endif; ?>
            <?php $__env->slot('action_button1_class'); ?>
                btn-primary
            <?php $__env->endSlot(); ?>
        <?php echo $__env->renderComponent(); ?>
	<div class="col-12">
		<div class="card">
			<div class="card-body">
				<h3><?php echo app('translator')->get('principle.edittitle'); ?></h3><br>
				<?php if($errors->any()): ?>
				<div class="alert alert-danger">
					<ul>
						<?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 method="post" class="btn-submit" action="<?php echo e(route('principle.update',$data->id)); ?>" enctype="multipart/form-data">
					<?php echo csrf_field(); ?>
					<?php echo method_field('PUT'); ?>
					<div class="row myinput">
						<div class="form-group mb-3 col-md-4">
							<label><?php echo app('translator')->get('principle.type'); ?>: <span class="text-danger" style="font-size: 15px;">*</span></label>
							<div class="input-group mt-2">
								<select class="form-control" name="type">
									<?php if(env('APP_URL') == 'https://ahrsc.edu.bd'): ?>
									<?php if($data->type == 1): ?>
									<option value="1"><?php echo app('translator')->get('principle.principal'); ?></option>
									<option value="2"><?php echo app('translator')->get('principle.president'); ?></option>
									<option value="3"><?php echo app('translator')->get('principle.minister_of_state'); ?></option>
									<option value="4"><?php echo app('translator')->get('principle.chairman'); ?></option>
									<?php endif; ?>
									<?php if($data->type == 2): ?>
									<option value="2"><?php echo app('translator')->get('principle.president'); ?></option>
									<option value="1"><?php echo app('translator')->get('principle.principal'); ?></option>
									<option value="3"><?php echo app('translator')->get('principle.minister_of_state'); ?></option>
									<option value="4"><?php echo app('translator')->get('principle.chairman'); ?></option>
									<?php endif; ?>
									<?php if($data->type == 3): ?>
									<option value="3"><?php echo app('translator')->get('principle.minister_of_state'); ?></option>
									<option value="1"><?php echo app('translator')->get('principle.principal'); ?></option>
									<option value="2"><?php echo app('translator')->get('principle.president'); ?></option>
									<option value="4"><?php echo app('translator')->get('principle.chairman'); ?></option>
									<?php endif; ?>
									<?php if($data->type == 4): ?>
									<option value="4"><?php echo app('translator')->get('principle.chairman'); ?></option>
									<option value="1"><?php echo app('translator')->get('principle.principal'); ?></option>
									<option value="2"><?php echo app('translator')->get('principle.president'); ?></option>
									<option value="3"><?php echo app('translator')->get('principle.minister_of_state'); ?></option>
									<?php endif; ?>

									<?php else: ?>
									<?php if($data->type == 1): ?>
									<option value="1"><?php echo app('translator')->get('principle.principal'); ?></option>
									<option value="2"><?php echo app('translator')->get('principle.president'); ?></option>
									<?php endif; ?>
									<?php if($data->type == 2): ?>
									<option value="2"><?php echo app('translator')->get('principle.president'); ?></option>
									<option value="1"><?php echo app('translator')->get('principle.principal'); ?></option>
									<?php endif; ?>
									<?php endif; ?>
								</select>
							</div>
						</div>
						<div class="form-group mb-3 col-md-4">
							<label><?php echo app('translator')->get('principle.name'); ?>: <span class="text-danger" style="font-size: 15px;">*</span></label>
							<div class="input-group mt-2">
								<input class="form-control" type="text" name="name" id="name"  value="<?php echo e($data->name); ?>" required="">
							</div>
						</div>
						<div class="form-group mb-3 col-md-4">
							<label><?php echo app('translator')->get('principle.name_bn'); ?>: <span class="text-danger" style="font-size: 15px;">*</span></label>
							<div class="input-group mt-2">
								<input class="form-control" type="text" name="name_bn" id="name_bn"  value="<?php echo e($data->name_bn); ?>" >
							</div>
						</div>
						<div class="form-group mb-3 col-md-6">
							<label><?php echo app('translator')->get('principle.details'); ?>: <span class="text-danger" style="font-size: 15px;">*</span></label>
							<div class="input-group mt-2">
								<textarea id="summernote"  class="form-control w-100" rows="10" type="text" name="details" required=""><?php echo e($data->details); ?></textarea>
							</div>
						</div>
						<div class="form-group mb-3 col-md-6">
							<label><?php echo app('translator')->get('principle.details_bn'); ?>: <span class="text-danger" style="font-size: 15px;">*</span></label>
							<div class="input-group mt-2">
								<textarea id="summernote1"  class="form-control w-100" rows="10" type="text" name="details_bn" ><?php echo e($data->details_bn); ?></textarea>
							</div>
						</div>
						<div class="form-group mb-3 col-md-12">
							<label><?php echo app('translator')->get('principle.image'); ?>: <span class="text-danger" style="font-size: 15px;">*</span></label>
							<div class="input-group mt-2">
								<input class="form-control" type="file" name="image" id="image">
								<br>
							</div>
							<img src="<?php echo e(asset($data->image)); ?>" style="max-height: 100px;">
						</div>
						<div class="modal-footer border-0">
							<button type="button" class="btn btn-secondary border-0" onClick="window.location.reload();"><?php echo app('translator')->get('common.close'); ?></button>
							<button type="submit" class="btn btn-success button border-0"><?php echo app('translator')->get('common.update'); ?></button>
						</div>
					</div>
				</form>
			</div> <!-- end card body-->
		</div> <!-- end card -->
	</div><!-- end col-->
</div>


<script src="<?php echo e(asset('assets/js/vendor/quill.min.js')); ?>"></script>
<script src="<?php echo e(asset('assets/js/pages/demo.quilljs.js')); ?>"></script>


<?php $__env->stopSection(); ?>


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