Course.php: format code for JavaScript function invite()

Bug430-Eden2
Lan Hui 2023-09-09 19:14:33 +08:00
parent a8b235052f
commit d5165af308
1 changed files with 26 additions and 25 deletions

View File

@ -582,32 +582,33 @@ include 'Header.php';
function invite(id) { function invite(id) {
try {
try $('<form id="frm" method="get" action="Script.php"> \
{ <input type="hidden" name="groupinvite" value="true"> \
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="groupinvite" value="true">\n\ <input type="hidden" name="groupid" value="'+id+'" > Enter Student ID to invite \
<input type="hidden" name="groupid" value="'+id+'" > Enter Student ID to invite <input type="text" name="student_id">\n\ <input type="text" name="student_id"> \
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({ <input type="hidden" name="url" value="<?php echo $url; ?>"> \
modal: true, <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> \
title:'Invite students to group', </form>').dialog({
close: function () { modal: true,
var closeBtn = $('.ui-dialog-titlebar-close'); title:'Invite students to group',
closeBtn.html(''); close: function () {
}, var closeBtn = $('.ui-dialog-titlebar-close');
buttons: { closeBtn.html('');
'Invite': function () { },
$('#frm').submit(); buttons: {
'Invite': function () {
$(this).dialog('close'); $('#frm').submit();
}, $(this).dialog('close');
'Cancel': function () { },
'Cancel': function () {
$(this).dialog('close'); $(this).dialog('close');
} }
}
});
} catch(e) {
alert(e);
} }
});
} catch(e){ alert(e); }
} }