103 lines
3.8 KiB
PHP
103 lines
3.8 KiB
PHP
<main class="common_margin" id="main">
|
|
<div class="main-wrap">
|
|
<div class="dashboard-cover">
|
|
<div class="subsec_sec">
|
|
<div class="subject_r">
|
|
<div class="subject_lsec">
|
|
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
|
<div class="common-heading">
|
|
<h2><?= $title; ?></h2>
|
|
</div>
|
|
<form id="receiveForm" method="POST">
|
|
<div class="common-sub-heading">Enter User ID</div>
|
|
<div class="subject_lformarea book-form-area receive-book">
|
|
<div class="form-group">
|
|
<input type="text" name="eu_unique_id" id="eu_unique_id" class="form-control" placeholder="Enter ID" autocomplete="off">
|
|
</div>
|
|
<button type="submit" class="subject_addbtn">Submit</button>
|
|
</div>
|
|
<p class="form_err" id="error-eu_unique_id"></p>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!--End right-top side-->
|
|
</div>
|
|
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
|
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
|
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
|
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
|
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
|
|
|
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
|
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
|
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
|
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('.user-drpdown').click(function() {
|
|
$('.drpdown-items').toggle();
|
|
});
|
|
});
|
|
|
|
|
|
//table js
|
|
$('#tbl').DataTable({
|
|
"lengthMenu": [
|
|
[5, 10, 25, 50, -1],
|
|
[5, 10, 25, 50, "All"]
|
|
]
|
|
});
|
|
//table js end
|
|
//multiple select js start
|
|
$('select').selectpicker();
|
|
//multiple select js end
|
|
</script>
|
|
<script>
|
|
$("#receiveForm").validate({
|
|
errorClass: 'error',
|
|
rules: {
|
|
eu_unique_id: {
|
|
required: true
|
|
}
|
|
},
|
|
messages: {
|
|
eu_unique_id: {
|
|
required: "User Id is required"
|
|
}
|
|
},
|
|
errorPlacement: function(error, element) {
|
|
if (element.attr("name") == "eu_unique_id") {
|
|
error.appendTo($("#error-eu_unique_id"));
|
|
} else {
|
|
error.appendTo(element);
|
|
}
|
|
},
|
|
submitHandler: function(form) {
|
|
var formdata = new FormData(form);
|
|
$.ajax({
|
|
type: 'post',
|
|
url: '<?= base_url(); ?>LmsAdmin/receive_book',
|
|
data: formdata,
|
|
cache: false,
|
|
contentType: false,
|
|
processData: false,
|
|
success: function(result) {
|
|
if (result == 0) {
|
|
$('#error-eu_unique_id').text('Issued Book not exists for this user.')
|
|
} else {
|
|
$('#error-eu_unique_id').html('');
|
|
window.location.href = '<?= base_url(); ?>receive-book-detail/' + result;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|