Courses.php: indent JavaScript code

Bug430-Eden2
Lan Hui 2023-09-04 20:20:43 +08:00
parent 593ac0219a
commit 8fbf0f1d1d
1 changed files with 26 additions and 27 deletions

View File

@ -25,11 +25,11 @@ include 'Header.php';
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js" integrity="sha512-57oZ/vW8ANMjR/KQ6Be9v/+/h6bq9/l3f0Oc7vn6qMqyhvPd1cvKBRWWpzu0QoneImqr2SkmO4MSqU+RpHom3Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
function extendDeadline(id) {
const dropstudents = $("#dropstudents").html();
try {
$(`<form id="frm" method="get" action="Script.php">
<script>
function extendDeadline(id) {
const dropstudents = $("#dropstudents").html();
try {
$(`<form id="frm" method="get" action="Script.php">
<input type="hidden" name="extenddeadline" value="true" >
<input type="hidden" name="id" value="${id}" >
New date and time<br>
@ -42,28 +42,27 @@ include 'Header.php';
<br>
${dropstudents}
</form>`).dialog({
modal: true,
title:'Extend deadline',
close: function () {
var closeBtn = $('.ui-dialog-titlebar-close');
closeBtn.html('');
},
buttons: {
'Submit': function () {
$('#frm').submit();
$(this).dialog('close');
},
'Cancel': function () {
$(this).dialog('close');
}
}
});
} catch(e) {
alert(e);
}
}
</script>
modal: true,
title:'Extend deadline',
close: function () {
var closeBtn = $('.ui-dialog-titlebar-close');
closeBtn.html('');
},
buttons: {
'Submit': function () {
$('#frm').submit();
$(this).dialog('close');
},
'Cancel': function () {
$(this).dialog('close');
}
}
});
} catch(e) {
alert(e);
}
}
</script>
<?php
if(!empty($_GET["course"]))