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

Bug430-Eden2
Lan Hui 2023-09-09 19:22:15 +08:00
parent eccd584d76
commit 8d30ecc584
1 changed files with 23 additions and 22 deletions

View File

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