IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Edit </strong> Section</h2>
</div>
<div class="body">
<?php if(isset($schoolName)): ?>
<?php echo Form::open(['url' => 'admin/section-update', 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-2 form-control-label required">
<label for="classname">School Name</label>
</div>
<div class="col-sm-4">
<div class="form-group">
<?php echo Form::select('schoolName', $schoolName, null, ['class' => 'form-control show-tick ms select2', 'required' => 'required']); ?>
<?php if($errors->has('schoolName')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('schoolName')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3 form-control-label required">
<label for="classname">Class</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idClass', [], null, ['class' => 'form-control show-tick ms select2', 'required' => 'required']); ?>
<?php if($errors->has('idClass')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idClass')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3 form-control-label required">
<label for="classname">Section</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idSection', [], null, ['class' => 'form-control show-tick ms select2', 'required' => 'required']); ?>
<?php if($errors->has('idSection')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idSection')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3 form-control-label required">
<label for="classname">Student</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idStudent', [], null, ['class' => 'form-control show-tick ms select2', 'required' => 'required']); ?>
<?php if($errors->has('idStudent')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idStudent')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3 form-control-label required">
<label for="classname">Changed Class</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idChangeClass', [], null, ['class' => 'form-control show-tick ms select2', 'required' => 'required']); ?>
<?php if($errors->has('idChangeClass')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idChangeClass')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-3 form-control-label required">
<label for="classname">Changed Section</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idChangeSection', [], null, ['class' => 'form-control show-tick ms select2', 'required' => 'required']); ?>
<?php if($errors->has('idChangeSection')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idChangeSection')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if(isset($transaction)): ?>
<?php echo Form::open(['url' => 'admin/section-update/'.$student->idStudent, 'class' => 'form-horizontal']); ?>
<input name="_method" type="hidden" value="PUT">
<?php
$cClass = DB::table('classes')->select('idClass','className')->where('idClass',$student->idClass)->first();
$cSection = DB::table('sections')->select('idSection','sectionName')->where('idSection',$student->idSection)->first();
?>
<fieldset id="payfee">
<input class="form-control" type="hidden" value="<?php echo e($student->idStudent); ?>" name="idStudent">
<input class="form-control" type="hidden" value="<?php echo e($updateClass->idClass); ?>" name="idClass">
<input class="form-control" type="hidden" value="<?php echo e($updateSection->idSection); ?>" name="idSection">
<p class="form-control-static" style="font-weight: bold">Current Student Details</p>
<table class="table">
<thead>
<tr>
<th>EC No</th>
<th>Student Name</th>
<th>Class</th>
<th>Section</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo e($student->firstName); ?></td>
<td><?php echo e($student->ecNo); ?></td>
<td><?php echo e($cClass->className); ?></td>
<td><?php echo e($cSection->sectionName); ?></td>
</tr>
</tbody>
</table>
<p class="form-control-static" style="font-weight: bold">Transfer Details</p>
<table class="table">
<thead>
<tr>
<th>Class</th>
<th>Section</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo e($updateClass->className); ?></td>
<td><?php echo e($updateSection->sectionName); ?></td>
</tr>
</tbody>
</table>
<p class="form-control-static" style="font-weight: bold">Payment Transfer</p>
<div class="row clearfix" >
<div class="col-sm-12 form-control-label">
<label>Please update the payment information in case of section transfer otherwise section update will not be reflected</label>
</div>
<table class="table">
<thead>
<tr>
<th>Current Header</th>
<th>Transfer Header</th>
</tr>
</thead>
<tbody>
<?php $k = 0;?>
<?php $__currentLoopData = $paidfees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $paidfee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$feehead = DB::table('feeheads')->where('idFeehead',$paidfee->idFeehead)->first();
$k++;
?>
<?php if(isset($feehead)): ?>
<tr>
<td>
<input class="form-control" type="hidden" name = "feeheader[<?php echo e($k); ?>][type]" value="full">
<input class="form-control" type="hidden" name = "feeheader[<?php echo e($k); ?>][old]" value="<?php echo e($feehead->idFeehead); ?>">
<input class="form-control" type="text" value="<?php echo e($feehead->feeheadName); ?>" readonly>
</td>
<td>
<select name='feeheader[<?php echo e($k); ?>][new]' class="form-control show-tick ms select2">
<option value="">--- Select ---</option>
<?php $__currentLoopData = $ufeeheaders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($key); ?>" <?php if( $feehead->feeheadName == $value): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</td>
</tr>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__currentLoopData = $lesserfees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $paidfee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$feehead = DB::table('feeheads')->where('idFeehead',$paidfee->idFeehead)->first();
$k++;
?>
<?php if(isset($feehead)): ?>
<tr>
<td>
<input class="form-control" type="hidden" name = "feeheader[<?php echo e($k); ?>][type]" value="less">
<input class="form-control" type="hidden" name = "feeheader[<?php echo e($k); ?>][old]" value="<?php echo e($feehead->idFeehead); ?>">
<input class="form-control" type="text" value="<?php echo e($feehead->feeheadName); ?>" readonly>
</td>
<td>
<select name='feeheader[<?php echo e($k); ?>][new]' class="form-control show-tick ms select2">
<option value="">--- Select ---</option>
<?php $__currentLoopData = $ufeeheaders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($key); ?>" <?php if( $feehead->feeheadName == $value): ?> selected <?php endif; ?>><?php echo e($value); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</td>
</tr>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<input class="form-control" type="hidden" value="<?php echo e($k); ?>" id="feeNumber">
</tbody>
</table>
</div>
</fieldset>
<?php endif; ?>
<div class="col-sm-3">
<?php echo Form::submit('SAVE', ['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).ready(function() {
$('select[name="schoolName"]').on('change', function () {
var classID = $(this).val();
if (classID) {
$.ajax({
url: "<?php echo e(url('/admin/section-update')); ?>" + '?id=' + classID + '&name=classes',
type: "GET",
dataType: "json",
success: function (data) {
$('select[name="idClass"]').empty();
$('select[name="idClass"]').append('<option value="">--- Select ---</option>');
$.each(data, function (key, value) {
$('select[name="idClass"]').append('<option value="' + key + '">' + value + '</option>');
});
$('select[name="idChangeClass"]').empty();
$('select[name="idChangeClass"]').append('<option value="">--- Select ---</option>');
$.each(data, function (key, value) {
$('select[name="idChangeClass"]').append('<option value="' + key + '">' + value + '</option>');
});
}
});
} else {
$('select[name="idClass"]').empty();
$('select[name="idChangeClass"]').empty();
}
});
$('select[name="idClass"]').on('change', function () {
var classID = $(this).val();
if (classID) {
$.ajax({
url: "<?php echo e(url('/admin/section-update')); ?>" + '?id=' + classID + '&name=section',
type: "GET",
dataType: "json",
success: function (data) {
$('select[name="idSection"]').empty();
$('select[name="idSection"]').append('<option value="">--- Select ---</option>');
$.each(data, function (key, value) {
$('select[name="idSection"]').append('<option value="' + key + '">' + value + '</option>');
});
$('select[name="idChangeSection"]').empty();
$('select[name="idChangeSection"]').append('<option value="">--- Select ---</option>');
$.each(data, function (key, value) {
$('select[name="idChangeSection"]').append('<option value="' + key + '">' + value + '</option>');
});
}
});
} else {
$('select[name="idSection"]').empty();
$('select[name="idChangeSection"]').empty();
}
});
$('select[name="idSection"]').on('change', function () {
var classID = $(this).val();
if (classID) {
$.ajax({
url: "<?php echo e(url('/admin/section-update')); ?>" + '?id=' + classID + '&name=student',
type: "GET",
dataType: "json",
success: function (data) {
$('select[name="idStudent"]').empty();
$('select[name="idStudent"]').append('<option value="">--- Select ---</option>');
$.each(data, function (key, value) {
$('select[name="idStudent"]').append('<option value="' + key + '">' + value + '</option>');
});
}
});
} else {
$('select[name="idStudent"]').empty();
}
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('superadmin.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -