Should fix bug in infocours.php when using jquery accordion plugin (encore)

skala
Julio Montoya 14 years ago
parent ed6312c025
commit 6aa80e47bb
  1. 7
      main/course_info/infocours.php
  2. 2
      main/inc/lib/formvalidator/Element/select_language.php
  3. 16
      main/inc/lib/formvalidator/Element/select_theme.php

@ -320,9 +320,10 @@ if (api_get_setting('allow_course_theme') == 'true') {
$group[]=$form->createElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeAllow'), 1);
$group[]=$form->createElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDisallow'), 0);
$form->addGroup($group, '', array(get_lang("AllowLearningPathTheme")), '<div></div>');
$form->addElement('select_theme', 'course_theme', get_lang('Theme'), '');
$form->applyFilter('course_theme', 'trim');
$group = array();
$group[]=$form->createElement('select_theme', 'course_theme', get_lang('Theme'));
$form->addGroup($group, '', array(get_lang("Theme")), '<div></div>');
}
if (is_settings_editable()) {

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
require_once ('HTML/QuickForm/select.php');
require_once 'HTML/QuickForm/select.php';
/**
* A dropdownlist with all languages to use with QuickForm
*/

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
require_once ('HTML/QuickForm/select.php');
require_once 'HTML/QuickForm/select.php';
/**
* A dropdownlist with all themes to use with QuickForm
*/
@ -13,21 +13,15 @@ class HTML_QuickForm_Select_Theme extends HTML_QuickForm_select
function HTML_QuickForm_Select_Theme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
if (!isset($attributes['class'])) {
$attributes['class'] = 'chzn-select';
}
}
parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes);
// Get all languages
$themes = api_get_themes();
$this->_options = array();
$this->_values = array();
$this->addOption('--',''); // no theme select
for ($i=0; $i< count($themes[0]);$i++)
{
for ($i=0; $i< count($themes[0]);$i++) {
$this->addOption($themes[1][$i],$themes[0][$i]);
}
/*foreach ($themes as $theme)
{
$this->addOption((empty($theme)?'--':$theme),$theme);
}*/
}
}
}
?>
}
Loading…
Cancel
Save