Merge branch 'CT7614' of https://github.com/aragonc/chamilo-lms into aragonc-CT7614

1.10.x
Yannick Warnier 10 years ago
commit d777571934
  1. 16
      main/course_info/tools.php
  2. 18
      main/inc/introductionSection.inc.php

@ -94,21 +94,21 @@ switch ($action) {
$iconsTools = '<div id="custom-icons">';
$iconsTools .= Display::page_header( get_lang('CustomizeIcons'),null,'h4');
$iconsTools .= '<div class="row">';
foreach($toolList as $tool){
foreach ($toolList as $tool) {
if($tool['id']>20){
if ($tool['id']>20) {
$toolName = $tool['name'];
}else{
} else {
$toolName = get_lang('Tool'.api_underscore_to_camel_case($tool['name']));
}
$iconsTools .= '<div class="col-md-2">';
$iconsTools .= '<div class="items-tools">';
if(!empty($tool['custom_icon'])){
if (!empty($tool['custom_icon'])) {
$image = getCustomWebIconPath().$tool['custom_icon'];
$icon = Display::img($image,$toolName);
}else{
} else {
$image = (substr($tool['image'], 0, strpos($tool['image'], '.'))).'.png';
$icon = Display::return_icon(
$image,
@ -120,8 +120,10 @@ switch ($action) {
}
$delete = (!empty($tool['custom_icon'])) ? '<a class="btn btn-default" href="' . api_get_self() . '?action=delete_icon&id=' . $tool['iid'] . '&'.api_get_cidreq().'">
<i class="fa fa-trash-o"></i></a>' : '';
$delete = (!empty($tool['custom_icon'])) ? "<a class=\"btn btn-default\" onclick=\"javascript:
if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
"')) return false;\" href=\"". api_get_self() . '?action=delete_icon&id=' . $tool['iid'] . '&'.api_get_cidreq()."\">
<i class=\"fa fa-trash-o\"></i></a>" : "";
$edit = '<a class="btn btn-default" href="' . api_get_self() . '?action=edit_icon&id=' . $tool['iid'] . '&'.api_get_cidreq().'"><i class="fa fa-pencil"></i></a>';

@ -312,10 +312,9 @@ if ($intro_dispCommand) {
'<a class="btn btn-default" href="'.api_get_self().'?'.api_get_cidreq().'&amp;intro_cmdEdit=1" title="'.get_lang('Modify').'">
<i class="fa fa-pencil"></i></a>';
$toolbar .= $editIconButton;
$toolbar .=
'<a class="btn btn-default" title="' . get_lang('Delete') . '" href="'.api_get_self().'?'.api_get_cidreq().'&amp;intro_cmdDel=1" onclick="javascript:
if(!confirm('.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
')) return false;"> <i class="fa fa-trash-o"></i> </a>';
$toolbar .="<a class=\"btn btn-default\" href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdDel=1\" onclick=\"javascript:
if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
"')) return false;\"><i class=\"fa fa-trash-o\"></i></a>";
} else {
$toolbar .=
@ -323,10 +322,9 @@ if ($intro_dispCommand) {
<i class="fa fa-pencil"></i>
</a>"';
$toolbar .= $editIconButton;
$toolbar .=
'<a class="btn btn-default" title="' . get_lang('Delete') . '" href="'.api_get_self().'?intro_cmdDel=1" onclick="javascript:
if(!confirm('.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).')) return false;>
<i class="fa fa-trash-o"></i> </a>';
$toolbar .= "<a class=\"btn btn-default\" href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdDel=1\" onclick=\"javascript:
if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
"')) return false;\"><i class=\"fa fa-trash-o\"></i></a>";
}
$toolbar .= "</div>";
// Fix for chrome XSS filter for videos in iframes - BT#7930
@ -344,7 +342,7 @@ if ($intro_dispDefault) {
$introduction_section .='<div class="page-course">';
$introduction_section .= $intro_content;
$introduction_section .= '</div>';
}else{
} else {
$introduction_section .= '<div class="help-course">';
$introduction_section .= get_lang('AddCustomCourse').' ' . $textIntro ;
$introduction_section .= '</div>';
@ -356,7 +354,7 @@ $introduction_section .= '</div>';
$introduction_section .= '</div>';
$introduction_section .= '</div>';
$browser = api_get_navigator();

Loading…
Cancel
Save