����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.145.201.49 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/bofirm.gltechlimited.com/public/frontend/assets/js/custom/ |
Upload File : |
(function ($) { "use strict"; $(document).on('click', '.addBundle', function () { var course_id = $(this).data('course_id'); var bundle_id = $('.bundle_id').val(); var route = $('.addBundleCourseRoute').val(); console.log(course_id, bundle_id, route) $.ajax({ type: "POST", url: route, data: {"course_id": course_id, "bundle_id": bundle_id, '_token': $('meta[name="csrf-token"]').attr('content')}, datatype: "json", success: function (response) { toastr.options.positionClass = 'toast-bottom-right'; if (response.status == 409){ toastr.error(response.msg); } if (response.status == 200) { $('.totalCourses').html(response.totalCourses); $('.appendAddRemoveBundleCourse'+ response.course_id).html(` <input class="form-check-input removeBundle " type="checkbox" checked data-course_id="${response.course_id}"> `) toastr.success(response.msg); } }, error: function () { alert("Error!"); }, }); }); $(document).on('click', '.removeBundle', function () { var course_id = $(this).data('course_id'); var bundle_id = $('.bundle_id').val(); var route = $('.removeBundleCourseRoute').val(); $.ajax({ type: "POST", url: route, data: {"course_id": course_id, "bundle_id": bundle_id, '_token': $('meta[name="csrf-token"]').attr('content')}, datatype: "json", success: function (response) { toastr.options.positionClass = 'toast-bottom-right'; if (response.status == 404){ toastr.error(response.msg); } if (response.status == 200) { $('.totalCourses').html(response.totalCourses); $('.appendAddRemoveBundleCourse'+ response.course_id).html(` <input class="form-check-input addBundle" type="checkbox" data-course_id="${response.course_id}"> `) toastr.info(response.msg); } }, error: function () { alert("Error!"); }, }); }); })(jQuery)