This portal only for GCC Officers. Based on there roles and Group ID they can view there module`s Like PGR, QR Public Asset Feedback, Makkalai Thedi Mayor,etc...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

670 lines
19 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html lang="en" dir="ltr">
  3. <html xmlns:th="http://www.thymeleaf.org">
  4. <head th:replace="~{fragments/modules/base/head :: head}"></head>
  5. <style>
  6. body {
  7. background-color: #f8f9fa;
  8. /* font-family: Arial, sans-serif;*/
  9. }
  10. .header {
  11. font-size: 22px;
  12. font-weight: bold;
  13. margin-bottom: 20px;
  14. }
  15. .table {
  16. border: 1px solid #dee2e6;
  17. }
  18. .table th,
  19. .table td {
  20. border: 1px solid #dee2e6;
  21. padding: 10px;
  22. }
  23. .section-title {
  24. font-size: 18px;
  25. font-weight: bold;
  26. margin-top: 20px;
  27. border-bottom: 2px solid #007bff;
  28. padding-bottom: 5px;
  29. }
  30. .form-group {
  31. margin-top: 15px;
  32. }
  33. .radio-group {
  34. display: flex;
  35. gap: 20px;
  36. margin-top: 10px;
  37. }
  38. .info-table {
  39. width: 100%;
  40. border-collapse: collapse;
  41. margin-top: 10px;
  42. }
  43. .info-table td,
  44. .info-table th {
  45. border: 1px solid #ddd;
  46. padding: 10px;
  47. vertical-align: middle;
  48. }
  49. .info-table td:first-child {
  50. font-weight: bold;
  51. width: 50%;
  52. }
  53. .info-table td:last-child {
  54. color: #555;
  55. }
  56. .btn-gap {
  57. margin-left: 1rem;
  58. /* or any value you like */
  59. }
  60. </style>
  61. <body>
  62. <div class="wrapper">
  63. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  64. <div class="page-wrap">
  65. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  66. <div class="card">
  67. <div class="main-content" style="background-color: white;">
  68. <!-- <div class="container">
  69. <div>
  70. <div style="padding: 0px;margin-top:-58px;margin-left: -233px;width:120%;">
  71. <div class="row" style=" padding: 15px;">
  72. <div class="col-md-6 form-group">
  73. <label>Total No of Students <span class="text-danger">*</span></label>
  74. <input type="text" class="form-control" placeholder="Enter the value"
  75. id="total_students" required />
  76. </div>
  77. </div>
  78. <div class="row" style=" padding: 15px;">
  79. <div class="col-md-4 form-group">
  80. <label>No of Boys <span class="text-danger">*</span></label>
  81. <input type="text" class="form-control" placeholder="Enter the value"
  82. id="total_boys" required />
  83. </div>
  84. <div class="col-md-4 form-group">
  85. <label>No of Girls <span class="text-danger">*</span></label>
  86. <input type="text" class="form-control" placeholder="Enter the value"
  87. id="total_girls" required />
  88. </div>
  89. <div class="col-md-4 form-group">
  90. <label>Others <span class="text-danger">*</span></label>
  91. <input type="text" class="form-control" placeholder="Enter the value"
  92. id="others" required />
  93. </div>
  94. </div>
  95. <div class="card-footer text-center" >
  96. <button type="submit" class="btn btn-primary" id="StudentSubmitBtn"><i
  97. class="ik ik-save"></i>Submit
  98. </button>
  99. <button type="reset" class="btn btn-secondary mr-2" id="StudentresetButton"><i
  100. class="ik ik-refresh-cw"></i>Reset
  101. </button>
  102. </div>
  103. </div>-->
  104. <div style="padding: 0px;margin-top:-58px;margin-left: -186px;width:120%;">
  105. <div class="card-header d-flex justify-content-between align-items-center">
  106. <b>Student Details</b>
  107. </div>
  108. <!-- Read-only View -->
  109. <div id="studentReadOnlyView" style="display: none;">
  110. <table class="info-table">
  111. <tr>
  112. <td>Total No of Students</td>
  113. <td id="readonly_total_students">-</td>
  114. </tr>
  115. <tr>
  116. <td>No of Boys</td>
  117. <td id="readonly_total_boys">-</td>
  118. </tr>
  119. <tr>
  120. <td>No of Girls</td>
  121. <td id="readonly_total_girls">-</td>
  122. </tr>
  123. <tr>
  124. <td>Transgender</td>
  125. <td id="readonly_others">-</td>
  126. </tr>
  127. </table>
  128. <br>
  129. <div class=" text-center">
  130. <button type="button" class="btn btn-primary" id="processupdate"
  131. style="display:none;">Update</button>
  132. </div>
  133. </div>
  134. <!-- Editable Form -->
  135. <div id="studentEntryForm" style="display: none;">
  136. <div class="row p-3">
  137. <div class="col-md-6 form-group">
  138. <label>Total No of Student <span class="text-danger">*</span></label>
  139. <input type="text" class="form-control" id="total_students" required />
  140. </div>
  141. </div>
  142. <div class="row p-3">
  143. <div class="col-md-4 form-group">
  144. <label>No of Boys <span class="text-danger">*</span></label>
  145. <input type="text" class="form-control" id="total_boys" required />
  146. </div>
  147. <div class="col-md-4 form-group">
  148. <label>No of Girls <span class="text-danger">*</span></label>
  149. <input type="text" class="form-control" id="total_girls" required />
  150. </div>
  151. <div class="col-md-4 form-group">
  152. <label>Transgender <span class="text-danger">*</span></label>
  153. <input type="text" class="form-control" id="others" required />
  154. </div>
  155. </div>
  156. <div class="card-footer text-center">
  157. <button type="submit" class="btn btn-primary" id="StudentSubmitBtn"><i
  158. class="ik ik-save"></i> Submit</button>
  159. <button type="reset" class="btn btn-secondary" id="StudentresetButton"><i
  160. class="ik ik-refresh-cw"></i> Reset</button>
  161. </div>
  162. </div>
  163. <!-- Modal for Update -->
  164. <div class="modal fade" id="studentUpdateModal" tabindex="-1">
  165. <div class="modal-dialog">
  166. <div class="modal-content">
  167. <div class="modal-header">
  168. <h5 class="modal-title">Update Student Details</h5>
  169. <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
  170. <span aria-hidden="true">&times;</span>
  171. </button>
  172. </div>
  173. <div class="modal-body">
  174. <div class="form-group"><label>Total Students *</label><input
  175. id="modal_total_students" class="form-control"></div>
  176. <div class="form-group"><label>No of Boys *</label><input id="modal_total_boys"
  177. class="form-control"></div>
  178. <div class="form-group"><label>No of Girls *</label><input
  179. id="modal_total_girls" class="form-control"></div>
  180. <div class="form-group"><label>Transgender *</label><input id="modal_others"
  181. class="form-control"></div>
  182. </div>
  183. <div class="modal-footer">
  184. <button type="button" class="btn btn-primary" id="saveModalUpdate">Save
  185. Changes</button>
  186. <button type="button" class="btn btn-secondary"
  187. data-bs-dismiss="modal">Close</button>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <div id="pageLoader"
  194. style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
  195. <div style="position: relative; top: 50%; transform: translateY(-50%);">
  196. <div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;">
  197. <span class="sr-only">Loading...</span>
  198. </div>
  199. <!-- Add the 'Please wait' text below the spinner -->
  200. <p style="margin-top: 1rem; font-size: 1.2rem; color: #007bff;">Please wait...</p>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  208. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
  209. <script type="text/javascript">
  210. $(document).ready(function () {
  211. const urlParams = new URLSearchParams(window.location.search);
  212. const schoolId = urlParams.get("schoolId");
  213. document.getElementById('total_students').addEventListener('input', function () {
  214. this.value = this.value.replace(/[^0-9]/g, '');
  215. if (parseInt(this.value) < 0) {
  216. this.value = '';
  217. }
  218. });
  219. document.getElementById('total_boys').addEventListener('input', function () {
  220. this.value = this.value.replace(/[^0-9]/g, '');
  221. if (parseInt(this.value) < 0) {
  222. this.value = '';
  223. }
  224. });
  225. document.getElementById('total_girls').addEventListener('input', function () {
  226. this.value = this.value.replace(/[^0-9]/g, '');
  227. if (parseInt(this.value) < 0) {
  228. this.value = '';
  229. }
  230. });
  231. document.getElementById('others').addEventListener('input', function () {
  232. this.value = this.value.replace(/[^0-9]/g, '');
  233. if (parseInt(this.value) < 0) {
  234. this.value = '';
  235. }
  236. });
  237. document.getElementById('modal_total_students').addEventListener('input', function () {
  238. this.value = this.value.replace(/[^0-9]/g, '');
  239. if (parseInt(this.value) < 0) {
  240. this.value = '';
  241. }
  242. });
  243. document.getElementById('modal_total_boys').addEventListener('input', function () {
  244. this.value = this.value.replace(/[^0-9]/g, '');
  245. if (parseInt(this.value) < 0) {
  246. this.value = '';
  247. }
  248. });
  249. document.getElementById('modal_total_girls').addEventListener('input', function () {
  250. this.value = this.value.replace(/[^0-9]/g, '');
  251. if (parseInt(this.value) < 0) {
  252. this.value = '';
  253. }
  254. });
  255. document.getElementById('modal_others').addEventListener('input', function () {
  256. this.value = this.value.replace(/[^0-9]/g, '');
  257. if (parseInt(this.value) < 0) {
  258. this.value = '';
  259. }
  260. });
  261. /* $.ajax({
  262. url: '/gcc/api/gccschool/buildingasset/getStudentStrengthBySchoolId',
  263. type: 'GET',
  264. data: {schoolId},
  265. success: function (response) {
  266. console.log(response);
  267. if (response.status === 'OK') {
  268. if(response.studentStrength.length > 0){
  269. const data = response.studentStrength[0]; // Get the first object from the array
  270. // Show the update button (assuming it's an ID, use #)
  271. $('#processupdate').show();
  272. //$('.card-footer').hide();
  273. $('#StudentSubmitBtn').hide();
  274. $('#StudentresetButton').hide();
  275. $('#refreshButton').show();
  276. // Populate values into the respective HTML elements
  277. $('#total_students').val(data.total_students || 0);
  278. $('#total_boys').val(data.total_boys || 0);
  279. $('#total_girls').val(data.total_girls || 0);
  280. $('#others').val(data.others || 0);
  281. }else
  282. {
  283. // Optional: handle the case where studentStrength is empty
  284. $('#total_students').text('');
  285. $('#total_boys').text('');
  286. $('#total_girls').text('');
  287. $('#others').text('');
  288. $('#processupdate').hide(); // hide update button if no data
  289. }
  290. }
  291. else if(response.status==='NEW'){
  292. $('#processupdate').hide();
  293. $('#refreshButton').hide();
  294. $('.card-footer').show();
  295. }
  296. }
  297. });*/
  298. $.ajax({
  299. url: '/gcc/api/gccschool/buildingasset/getStudentStrengthBySchoolId',
  300. type: 'GET',
  301. data: {schoolId},
  302. success: function (response) {
  303. if (response.status === 'OK' && response.studentStrength.length > 0) {
  304. const data = response.studentStrength[0];
  305. $('#readonly_total_students').text(data.total_students || 0);
  306. $('#readonly_total_boys').text(data.total_boys || 0);
  307. $('#readonly_total_girls').text(data.total_girls || 0);
  308. $('#readonly_others').text(data.others || 0);
  309. $('#studentReadOnlyView').show();
  310. $('#studentEntryForm').hide();
  311. $('#processupdate').show();
  312. $('#refreshButton').show();
  313. } else {
  314. $('#studentReadOnlyView').hide();
  315. $('#studentEntryForm').show();
  316. $('.card-footer').show();
  317. $('#processupdate').hide();
  318. $('#refreshButton').hide();
  319. }
  320. }
  321. });
  322. $('#processupdate').on('click', function () {
  323. $('#modal_total_students').val($('#readonly_total_students').text());
  324. $('#modal_total_boys').val($('#readonly_total_boys').text());
  325. $('#modal_total_girls').val($('#readonly_total_girls').text());
  326. $('#modal_others').val($('#readonly_others').text());
  327. $('#studentUpdateModal').modal('show');
  328. });
  329. $('#saveModalUpdate').on('click', function () {
  330. let requestData = {
  331. total_students: parseInt($('#modal_total_students').val()) || 0,
  332. total_boys: parseInt($('#modal_total_boys').val()) || 0,
  333. total_girls: parseInt($('#modal_total_girls').val()) || 0,
  334. others: parseInt($('#modal_others').val()) || 0,
  335. school_id: schoolId
  336. };
  337. if (!$('#modal_total_students').val().trim()) {
  338. Swal.fire({
  339. icon: 'warning',
  340. title: 'Validation Error',
  341. text: 'Please enter Total No of Students.',
  342. allowOutsideClick: false,
  343. allowEscapeKey: false,
  344. allowEnterKey: false,
  345. showConfirmButton: true
  346. });
  347. return;
  348. }
  349. if (!$('#modal_total_boys').val().trim()) {
  350. Swal.fire({
  351. icon: 'warning',
  352. title: 'Validation Error',
  353. text: 'Please enter No of Boys.',
  354. allowOutsideClick: false,
  355. allowEscapeKey: false,
  356. allowEnterKey: false,
  357. showConfirmButton: true
  358. });
  359. return;
  360. }
  361. if (!$('#modal_total_girls').val().trim()) {
  362. Swal.fire({
  363. icon: 'warning',
  364. title: 'Validation Error',
  365. text: 'Please enter No of Girls.',
  366. allowOutsideClick: false,
  367. allowEscapeKey: false,
  368. allowEnterKey: false,
  369. showConfirmButton: true
  370. });
  371. return;
  372. }
  373. if (!$('#modal_others').val().trim()) {
  374. Swal.fire({
  375. icon: 'warning',
  376. title: 'Validation Error',
  377. text: 'Please enter No of Transgender.',
  378. allowOutsideClick: false,
  379. allowEscapeKey: false,
  380. allowEnterKey: false,
  381. showConfirmButton: true
  382. });
  383. return;
  384. }
  385. if (requestData.total_students !== (requestData.total_boys + requestData.total_girls + requestData.others)) {
  386. Swal.fire('Validation Error', 'Total should equal Boys + Girls + Transgender.', 'warning');
  387. return;
  388. }
  389. $('#pageLoader').show();
  390. $.ajax({
  391. url: '/gcc/api/gccschool/schoolproperty/updateStudentDetails',
  392. type: 'POST',
  393. contentType: 'application/x-www-form-urlencoded', // important
  394. data: $.param(requestData), // flatten the object correctly
  395. success: function (res) {
  396. console.log("res:" + res);
  397. $('#pageLoader').hide();
  398. $('#studentUpdateModal').modal('hide');
  399. // Swal.fire('Updated!', res, 'success').then(() => location.reload());
  400. Swal.fire({
  401. title: 'Updated!',
  402. text: 'Student strength details updated successfully!',
  403. icon: 'success',
  404. allowOutsideClick: false,
  405. allowEscapeKey: false,
  406. allowEnterKey: false,
  407. showConfirmButton: true
  408. }).then(() => location.reload());
  409. },
  410. error: function (err) {
  411. $('#pageLoader').hide();
  412. Swal.fire({
  413. title: 'Error',
  414. text: err.responseText,
  415. icon: 'error',
  416. allowOutsideClick: false,
  417. allowEscapeKey: false,
  418. allowEnterKey: false,
  419. showConfirmButton: true
  420. });
  421. // Swal.fire('Error', err.responseText, 'error');
  422. }
  423. });
  424. });
  425. $(document).on('click', '#StudentSubmitBtn', function () {
  426. //parseInt($('#tot_staff').val()) || 0;
  427. let total_students = parseInt($('#total_students').val()) || 0;
  428. let total_boys = parseInt($('#total_boys').val()) || 0;
  429. let total_girls = parseInt($('#total_girls').val()) || 0;
  430. let others = parseInt($('#others').val()) || 0;
  431. //let school_id = 1;
  432. console.log("total_students=", total_students);
  433. console.log("total_boys=", total_boys);
  434. console.log("total_girls=", total_girls);
  435. console.log("others=", others);
  436. console.log("school_id=", schoolId);
  437. if (!$('#total_students').val().trim()) {
  438. Swal.fire({
  439. icon: 'warning',
  440. title: 'Validation Error',
  441. text: 'Please enter Total No of Students.',
  442. allowOutsideClick: false,
  443. allowEscapeKey: false,
  444. allowEnterKey: false,
  445. showConfirmButton: true
  446. });
  447. return;
  448. }
  449. if (!$('#total_boys').val().trim()) {
  450. Swal.fire({
  451. icon: 'warning',
  452. title: 'Validation Error',
  453. text: 'Please enter No of Boys.',
  454. allowOutsideClick: false,
  455. allowEscapeKey: false,
  456. allowEnterKey: false,
  457. showConfirmButton: true
  458. });
  459. return;
  460. }
  461. if (!$('#total_girls').val().trim()) {
  462. Swal.fire({
  463. icon: 'warning',
  464. title: 'Validation Error',
  465. text: 'Please enter No of Girls.',
  466. allowOutsideClick: false,
  467. allowEscapeKey: false,
  468. allowEnterKey: false,
  469. showConfirmButton: true
  470. });
  471. return;
  472. }
  473. if (!$('#others').val().trim()) {
  474. Swal.fire({
  475. icon: 'warning',
  476. title: 'Validation Error',
  477. text: 'Please enter No of Transgender.',
  478. allowOutsideClick: false,
  479. allowEscapeKey: false,
  480. allowEnterKey: false,
  481. showConfirmButton: true
  482. });
  483. return;
  484. }
  485. // Validate inputs
  486. let fields = {
  487. "Total No of Students": total_students,
  488. "No of Boys": total_boys,
  489. "No of Girls": total_girls,
  490. "Others": others,
  491. };
  492. /*for (let key in fields) {
  493. if (!fields[key] || isNaN(fields[key])) {
  494. Swal.fire({
  495. icon: 'info',
  496. title: 'Validation Error',
  497. text: `Please enter ${key}` + " , IF No means Enter 0",
  498. confirmButtonText: 'OK'
  499. });
  500. return; // Stop execution if validation fails
  501. }
  502. }*/
  503. if (total_students !== (total_boys + total_girls + others)) {
  504. Swal.fire({
  505. icon: 'warning',
  506. title: 'Validation Error',
  507. text: 'Total Students must be equal to the sum of No of Boys, No of Girls, and Transgender.',
  508. allowOutsideClick: false, // Disable clicking outside the modal to close it
  509. allowEscapeKey: false, // Disable escape key to close the modal
  510. allowEnterKey: false, // Disable enter key to close the modal
  511. showConfirmButton: true
  512. });
  513. return;
  514. }
  515. // Prepare Data for AJAX
  516. let requestData = {
  517. total_students: total_students,
  518. total_boys: total_boys,
  519. total_girls: total_girls,
  520. school_id: schoolId,
  521. others: others
  522. };
  523. $('#StudentSubmitBtn').prop('disabled', true).text('Processing...');
  524. $('#pageLoader').show();
  525. $.ajax({
  526. url: '/gcc/api/gccschool/schoolproperty/saveStudentStrength',
  527. type: 'POST',
  528. contentType: 'application/x-www-form-urlencoded',
  529. data: $.param(requestData),
  530. success: function (response) {
  531. $('#pageLoader').hide();
  532. $('#StudentSubmitBtn').prop('disabled', false).text('Submit');
  533. Swal.fire({
  534. icon: 'success',
  535. title: 'Success',
  536. text: response,
  537. allowOutsideClick: false,
  538. allowEscapeKey: false,
  539. allowEnterKey: false,
  540. confirmButtonText: 'OK'
  541. }).then((result) => {
  542. if (result.isConfirmed) {
  543. $('#StudentSubmitBtn').prop('disabled', false).text('Submit');
  544. location.reload();
  545. }
  546. });
  547. },
  548. error: function (xhr, status, error) {
  549. $('#pageLoader').hide();
  550. $('#StudentSubmitBtn').prop('disabled', false).text('Submit');
  551. let errorMessage = xhr.responseText;
  552. Swal.fire({
  553. icon: 'error',
  554. title: 'Error',
  555. text: errorMessage,
  556. confirmButtonText: 'OK'
  557. });
  558. console.error('Error:', xhr.responseText);
  559. }
  560. });
  561. });
  562. function resetStudentFields() {
  563. console.log("Reset button clicked");
  564. $('#total_students, #total_boys, #total_girls, #others').val('');
  565. }
  566. // Event Listener for Reset Button
  567. $(document).on('click', '#StudentresetButton', function (event) {
  568. event.preventDefault();
  569. resetStudentFields();
  570. });
  571. $('#refreshButton').on('click', function (e) {
  572. e.preventDefault(); // prevent default reset behavior, optional
  573. location.reload();
  574. });
  575. });
  576. </script>
  577. </body>
  578. </html>