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

Bug430-Eden2
Lan Hui 2023-09-09 19:20:48 +08:00
parent 4caffe4709
commit eccd584d76
1 changed files with 24 additions and 23 deletions

View File

@ -657,30 +657,31 @@ include 'Header.php';
function removeMember(student_id, group_id) {
try
{
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="removemember" value="true">\n\
<input type="hidden" name="student_id" value="'+student_id+'" > \n\
<input type="hidden" name="group_id" value="'+group_id+'">\n\
<input type="hidden" name="url" value="<?php echo $url; ?>"></form>').dialog({
modal: true,
title:'Kick out '+student_id+'?',
close: function () {
var closeBtn = $('.ui-dialog-titlebar-close');
closeBtn.html('');
},
buttons: {
'Yes': function () {
$('#frm').submit();
$(this).dialog('close');
},
'No': function () {
$(this).dialog('close');
}
try {
$('<form id="frm" method="get" action="Script.php"> \
<input type="hidden" name="removemember" value="true"> \
<input type="hidden" name="student_id" value="'+student_id+'" > \
<input type="hidden" name="group_id" value="'+group_id+'"> \
<input type="hidden" name="url" value="<?php echo $url; ?>"></form>').dialog({
modal: true,
title:'Kick out '+student_id+'?',
close: function () {
var closeBtn = $('.ui-dialog-titlebar-close');
closeBtn.html('');
},
buttons: {
'Yes': function () {
$('#frm').submit();
$(this).dialog('close');
},
'No': function () {
$(this).dialog('close');
}
}
});
} catch(e) {
alert(e);
}
});
} catch(e){ alert(e); }
}