Course.php: indent JavaScript code.

Bug430-Eden2
Lan Hui 2023-08-31 20:35:09 +08:00
parent 63c4da74f8
commit 71e835f3fd
1 changed files with 27 additions and 22 deletions

View File

@ -549,30 +549,35 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
<script> <script>
function createGroup() { function createGroup() {
try try {
{ $('<form id="frm" method="get" action="Script.php"> \
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\ <input type="hidden" name="creategroup" value="true"> \
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group name <input type="text" name="name">\n\ <input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > \
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="id" value="<?php echo $course_id; ?>"> </form>').dialog({ Group name \
modal: true, <input type="text" name="name"> \
title:'Create a group', <input type="hidden" name="url" value="<?php echo $url; ?>"> \
close: function () { <input type="hidden" name="id" value="<?php echo $course_id; ?>"> \
var closeBtn = $('.ui-dialog-titlebar-close'); </form>').dialog({
closeBtn.html(''); modal: true,
}, title:'Create a group',
buttons: { close: function () {
'Create': function () { var closeBtn = $('.ui-dialog-titlebar-close');
$('#frm').submit(); closeBtn.html('');
$(this).dialog('close'); },
}, buttons: {
'Cancel': function () { 'Create': function () {
$(this).dialog('close'); $('#frm').submit();
} $(this).dialog('close');
},
'Cancel': function () {
$(this).dialog('close');
}
}
});
} catch(e) {
alert(e);
} }
});
} catch(e){ alert(e); }
} }