Commit 7139bc13 by Manoj

changes

parent 6949c311
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
<td><?= $i ?></td> <td><?= $i ?></td>
<td><?= $row->academic ?></td> <td><?= $row->academic ?></td>
<td><?= $row->exam_schedule ?></td> <td><?= $row->exam_schedule ?></td>
<td><?= $row->date ?></td> <td><?= date($row->date) ?></td>
<td><?= $row->time ?></td> <td><?= $row->time ?></td>
<td> <td>
<a data-toggle="tooltip" id="edit" data-placement="top" title="Edit" data-original-title="Edit" onclick="edit('<?php echo $row->id; ?>', '<?php echo $row->academic; ?>', '<?php echo $row->exam_schedule; ?>')" class="btn btn-sm btn-info"><i class="ti ti-pencil"></i></a> <a data-toggle="tooltip" id="edit" data-placement="top" title="Edit" data-original-title="Edit" onclick="edit('<?php echo $row->id; ?>', '<?php echo $row->academic; ?>', '<?php echo $row->exam_schedule; ?>','<?php echo $row->date; ?>','<?php echo $row->time; ?>')" class="btn btn-sm btn-info"><i class="ti ti-pencil"></i></a>
<a data-toggle="tooltip" data-placement="top" title="Delete" data-original-title="Delete" onclick="deleteCourse('<?php echo $row->id; ?>','<?php echo $row->status; ?>')" class="btn btn-sm <?php echo $row->status == 1 ? 'btn-primary' : 'btn-danger' ?> text-white"><?php echo $row->status == 1 ? 'Active' : 'In-Active' ?></a> <a data-toggle="tooltip" data-placement="top" title="Delete" data-original-title="Delete" onclick="deleteCourse('<?php echo $row->id; ?>','<?php echo $row->status; ?>')" class="btn btn-sm <?php echo $row->status == 1 ? 'btn-primary' : 'btn-danger' ?> text-white"><?php echo $row->status == 1 ? 'Active' : 'In-Active' ?></a>
</td> </td>
</tr> </tr>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<div class="modal-dialog modal-lg modal-dialog-center"> <div class="modal-dialog modal-lg modal-dialog-center">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Add Exam Schedule </h1> <h1 class="modal-title fs-5" id="formTitle">Add Exam Schedule </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<form method="POST" action="<?php echo base_url('ApplicationController/commonStatusChange/') ?>" id="courseForm"> <form method="POST" action="<?php echo base_url('ApplicationController/commonStatusChange/') ?>" id="courseForm">
<input type="hidden" id='rowId' name='id'> <input type="hidden" id='rowId' name='id'>
<input type="hidden" id='rowStatus' name='status'> <input type="hidden" id='rowStatus' name='status'>
<input type="hidden" id='table' name='table' value="application_fees"> <input type="hidden" id='table' name='table' value="exam_schedule">
<div class="form-group"> <div class="form-group">
<h4>Are You Sure you want to change the status?</h4> <h4>Are You Sure you want to change the status?</h4>
</div> </div>
...@@ -176,15 +176,14 @@ ...@@ -176,15 +176,14 @@
</html> </html>
<script> <script>
function edit(id, feesVal, courseId) { function edit(id, academic, schedule,date,time) {
$('#course_name_err').text(' ')
$('#fees_err').text(' ')
$('#id').val(id) $('#id').val(id)
$('#fees').val(feesVal) $('#academic').val(academic)
$('#courseId').val(courseId) $('#schedule').val(schedule )
$('#courseId').val(courseId).trigger('change'); $('#date').val(date)
$('#formTitle').text('Edit Course') $('#time').val(time)
$('#formTitle').text('Edit Exam Schedule')
$("#applicationModal").modal('show'); $("#applicationModal").modal('show');
$("#courseId").select2({ $("#courseId").select2({
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<!-- Title --> <!-- Title -->
<title>Question</title> <title>Edit Question</title>
<!-- Meta --> <!-- Meta -->
<style> <style>
...@@ -25,46 +25,59 @@ ...@@ -25,46 +25,59 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card "> <div class="card ">
<div class="card-body"> <div class="card-body">
<h2 class="card-title">Add Question</h2><bR> <h2 class="card-title">Edit Question</h2><bR>
<form action="<?php echo base_url(); ?>ApplicationController/questionAdd" method="post" enctype="multipart/form-data" id="registration_form"> <form action="<?php echo base_url(); ?>ApplicationController/questionAdd" method="post" enctype="multipart/form-data" id="registration_form">
<div class="row"> <div class="row">
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label class="tx-medium">Academic Year<span class="text-danger">*</span> </label> <label class="tx-medium">Academic Year<span class="text-danger">*</span> </label>
<select name="academic" id="academic" class="form-control select2 modal-select"> <select name="academic" id="academic" class="form-control select2 modal-select">
<option value="">--Select--</option> <option value="">--Select--</option>
<?php foreach ($academic_year as $row) { ?> <?php foreach ($academic_year as $row) { ?>
<option value="<?php echo $row->id ?>"> <?php echo $row->year ?></option> <option <?= $default['academic']== $row->id ? 'selected ' : '' ?> value="<?php echo $row->id ?>"> <?php echo $row->year ?></option>
<?php } ?> <?php } ?>
</select> </select>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label class="tx-medium">Exam Type<span class="text-danger">*</span> </label> <label class="tx-medium">Exam Type<span class="text-danger">*</span> </label>
<select name="exam_type" id="exam_type" class="form-control select2 modal-select"> <select name="exam_type" id="exam_type" class="form-control select2 modal-select">
<option value="">--Select--</option> <option value="">--Select--</option>
<?php foreach ($exam_type as $row) { ?> <?php foreach ($exam_type as $row) { ?>
<option value="<?php echo $row->id ?>"> <?php echo $row->exam_type_name ?></option> <option <?= $default['exam_type']== $row->id ? 'selected ' : '' ?> value="<?php echo $row->id ?>"> <?php echo $row->exam_type_name ?></option>
<?php } ?> <?php } ?>
</select> </select>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-3">
<label class="tx-medium">Category<span class="text-danger">*</span> </label> <label class="tx-medium">Category<span class="text-danger">*</span> </label>
<select name="category" id="category" class="form-control select2 modal-select"> <select name="category" id="category" class="form-control select2 modal-select">
<option value="">--Select--</option> <option value="">--Select--</option>
<?php foreach ($category as $row) { ?> <?php foreach ($category as $row) { ?>
<option value="<?php echo $row->id ?>"> <?php echo $row->category ?></option> <option <?= $default['category']== $row->id ? 'selected ' : '' ?> value="<?php echo $row->id ?>"> <?php echo $row->category ?></option>
<?php } ?> <?php } ?>
</select> </select>
</div> </div>
<div class="form-group col-md-3">
<label class="tx-medium">Schedule <span class="text-danger">*</span> </label>
<select name="schedule" id="schedule" class="form-control select2 modal-select">
<option value="">--Select--</option>
<?php foreach ($schedule as $row) { ?>
<option <?= $default['schedule_id']== $row->id ? 'selected ' : '' ?> value="<?php echo $row->id ?>"> <?php echo $row->exam_schedule ?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-12 mt-3"> <div class="form-group col-md-12 mt-3">
...@@ -128,10 +141,10 @@ ...@@ -128,10 +141,10 @@
<select name="answer" id="answer" class="form-control select2 modal-select"> <select name="answer" id="answer" class="form-control select2 modal-select">
<option value="">--Select Answer--</option> <option value="">--Select Answer--</option>
<option value="a">A</option> <option <?= $default['answer']== 'a' ? 'selected ' : '' ?> value="a">A</option>
<option value="b">B</option> <option <?= $default['answer']== 'b' ? 'selected ' : '' ?> value="b">B</option>
<option value="c">C</option> <option <?= $default['answer']== 'c' ? 'selected ' : '' ?> value="c">C</option>
<option value="d">D</option> <option <?= $default['answer']== 'd' ? 'selected ' : '' ?> value="d">D</option>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment