Better indented JavaScript code.

Bug430-Eden2
Lan Hui 2023-08-02 15:27:51 +08:00
parent 6b8f97dc58
commit 122bd27e80
1 changed files with 32 additions and 39 deletions

View File

@ -26,47 +26,39 @@ if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
<script src="./css/jquery-1.11.1.min.js"></script>
<script src="./css/jquery-ui.min.js"></script>
<link rel="stylesheet" href="./css/jquery-ui.css" />
<script>
function extendDeadline(id) {
var dropstudents=$("#dropstudents").html();
try
{
$('<form id="frm" method="get" action="Script.php">\n\
<input type="hidden" name="extenddeadline" value="true" >\n\
<input type="hidden" name="id" value="'+id+'" > \n\
New Date/Time <br><input type="date" name="date" required=""> <input type="time" name="time" required=""> \n\
\n\
<br><input type="radio" value="1" name="type" required=""> Extend for All<hr> \n\
<input type="radio" value="2" name="type" required=""> Extend for these Individual Students \n\
'+dropstudents+' \n\
</form>').dialog({
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>
<input type="date" name="date" required="">
<input type="time" name="time" required="">
<br>
<input type="radio" value="1" name="type" required=""> Extend for all
<br>
<input type="radio" value="2" name="type" required=""> Extend for one
<br>
${dropstudents}
</form>`).dialog({
modal: true,
title:'Extend Deadline',
title:'Extend deadline',
buttons: {
'Submit': function () {
$('#frm').submit();
$(this).dialog('close');
},
'X': function () {
'Cancel': function () {
$(this).dialog('close');
}
}
});
}catch(e){ alert(e); }
} catch(e) {
alert(e);
}
}
</script>
@ -511,6 +503,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
<?php
}
if( $_SESSION['user_type']=="Student")
{
?>