From 6fc9149c7431232b7b3129661b46be704bc9d77a Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 16 May 2017 10:16:12 +0200 Subject: [PATCH] Add js warning popup see BT#12744 --- main/mySpace/myStudents.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index ad99038a8b..8881e984d3 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -1110,14 +1110,17 @@ if (!empty($student_id)) { if (api_is_allowed_to_edit()) { echo ''; if ($any_result === true) { - echo ''; - echo Display::return_icon( + $url = 'myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.$course_code.'&course='.$course_code.'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId; + echo Display::url( + Display::return_icon( 'clean.png', get_lang('Clean'), '', ICON_SIZE_SMALL - ).''; - echo ''; + ), + $url, + ['onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToDelete')))."')) return false;"] + ); } echo ''; echo '';