Browse Source

Fix issue with new FormValidator/Quickform element SelectTheme (replacing select_theme)

Yannick Warnier 10 years ago
parent
commit
bc820d8085

+ 1 - 1
main/auth/profile.php

@@ -219,7 +219,7 @@ if (api_get_setting('profile', 'language') !== 'true') {
 
 //THEME
 if (is_profile_editable() && api_get_setting('user_selected_theme') == 'true') {
-    $form->addElement('select_theme', 'theme', get_lang('Theme'));
+    $form->addElement('SelectTheme', 'theme', get_lang('Theme'));
     if (api_get_setting('profile', 'theme') !== 'true') {
         $form->freeze('theme');
     }

+ 1 - 1
main/course_info/infocours.php

@@ -158,7 +158,7 @@ if (api_get_setting('pdf_export_watermark_by_course') == 'true') {
 }
 
 $group = array();
-$group[]=$form->createElement('select_theme', 'course_theme', null, array('class'=>' ', 'id'=>'course_theme_id'));
+$group[]=$form->createElement('SelectTheme', 'course_theme', null, array('class'=>' ', 'id'=>'course_theme_id'));
 $form->addGroup($group, '', array(get_lang("Stylesheets")), '');
 
 $form->addElement('label', get_lang('DocumentQuota'), format_file_size(DocumentManager::get_course_quota()));

+ 2 - 2
main/inc/lib/formvalidator/Element/select_theme.php → main/inc/lib/formvalidator/Element/SelectTheme.php

@@ -4,12 +4,12 @@
 /**
 * A dropdownlist with all themes to use with QuickForm
 */
-class HTML_QuickForm_Select_Theme extends HTML_QuickForm_select
+class SelectTheme extends HTML_QuickForm_select
 {
 	/**
 	 * Class constructor
 	 */
-	function HTML_QuickForm_Select_Theme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {	    
+	function SelectTheme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
 	    if (!isset($attributes['class'])) {
 	        //todo this was comment due a bug in infocours.php with jquery-ui 
             //$attributes['class'] = 'chzn-select';

+ 1 - 1
main/inc/lib/formvalidator/FormValidator.class.php

@@ -122,7 +122,7 @@ class FormValidator extends HTML_QuickForm
         $this->registerElementType('receivers', $dir . 'Element/receivers.php', 'HTML_QuickForm_receivers');
         $this->registerElementType('select_language', $dir . 'Element/select_language.php', 'HTML_QuickForm_Select_Language');
         $this->registerElementType('select_ajax', $dir . 'Element/select_ajax.php', 'HTML_QuickForm_Select_Ajax');
-        $this->registerElementType('select_theme', $dir . 'Element/select_theme.php', 'HTML_QuickForm_Select_Theme');
+        $this->registerElementType('SelectTheme', $dir . 'Element/SelectTheme.php', 'HTML_QuickForm_Select_Theme');
         $this->registerElementType('style_submit_button', $dir . 'Element/style_submit_button.php', 'HTML_QuickForm_stylesubmitbutton');
         $this->registerElementType('style_reset_button', $dir . 'Element/style_reset_button.php', 'HTML_QuickForm_styleresetbutton');
         $this->registerElementType('button', $dir . 'Element/style_submit_button.php', 'HTML_QuickForm_stylesubmitbutton');

+ 1 - 1
main/newscorm/lp_edit.php

@@ -111,7 +111,7 @@ if (api_get_setting('allow_course_theme') == 'true') {
     $mycourselptheme = api_get_course_setting('allow_learning_path_theme');
     if (!empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1) {
         //LP theme picker
-        $theme_select = $form->addElement('select_theme', 'lp_theme', get_lang('Theme'));
+        $theme_select = $form->addElement('SelectTheme', 'lp_theme', get_lang('Theme'));
         $form->applyFilter('lp_theme', 'trim');
 
         $s_theme = $_SESSION['oLP']->get_theme();