diff --git a/main/course_info/infocours.php b/main/course_info/infocours.php index 445acae885..a3299ac096 100644 --- a/main/course_info/infocours.php +++ b/main/course_info/infocours.php @@ -203,7 +203,7 @@ $form->addGroup($group, '', array(get_lang("Unsubscription")), '
'); $form->add_textfield('course_registration_password', get_lang('CourseRegistrationPassword'), false, array('size' => '60')); $form->addElement('checkbox', 'activate_legal', array(null, get_lang('ShowALegalNoticeWhenEnteringTheCourse')), get_lang('ActivateLegal')); -$form->addElement('textarea', 'legal', get_lang('CourseLegal'), array('cols'=>75, 'rows' => 10)); +$form->addElement('textarea', 'legal', get_lang('CourseLegalAgreement'), array('cols'=>75, 'rows' => 10)); $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"'); @@ -308,7 +308,7 @@ $form->addElement('html', ''); // LEARNING PATH -$form->addElement('html', '

'.Display::return_icon('scorms.png', addslashes(get_lang('ConfigLearnpath')),'','22').' '.addslashes(get_lang('ConfigLearnpath')).'

'); +$form->addElement('html', '

'.Display::return_icon('scorms.png', addslashes(get_lang('ConfigLearnpath')),'','22').' '.Security::remove_XSS(get_lang('ConfigLearnpath')).'

'); //Auto launch LP $group = array(); @@ -325,7 +325,7 @@ if (api_get_setting('allow_course_theme') == 'true') { $form->addGroup($group, '', array(get_lang("AllowLearningPathTheme")), '
'); $group = array(); - $group[]=$form->createElement('select_theme', 'course_theme', null); + $group[]=$form->createElement('select_theme', 'course_theme', null, array('class'=>' ', 'id'=>'course_theme_id')); $form->addGroup($group, '', array(get_lang("Stylesheets")), '
'); } diff --git a/main/inc/lib/formvalidator/Element/select_theme.php b/main/inc/lib/formvalidator/Element/select_theme.php index 03404f38b2..3f1c47fb7a 100644 --- a/main/inc/lib/formvalidator/Element/select_theme.php +++ b/main/inc/lib/formvalidator/Element/select_theme.php @@ -10,9 +10,10 @@ class HTML_QuickForm_Select_Theme extends HTML_QuickForm_select /** * Class constructor */ - function HTML_QuickForm_Select_Theme($elementName=null, $elementLabel=null, $options=null, $attributes=null) { + function HTML_QuickForm_Select_Theme($elementName=null, $elementLabel=null, $options=null, $attributes=null) { if (!isset($attributes['class'])) { - $attributes['class'] = 'chzn-select'; + //todo this was comment due a bug in infocours.php with jquery-ui + //$attributes['class'] = 'chzn-select'; } parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes); // Get all languages diff --git a/main/inc/lib/javascript/jquery-ui/default.css b/main/inc/lib/javascript/jquery-ui/default.css index 3c4564ae66..2ab5393680 100644 --- a/main/inc/lib/javascript/jquery-ui/default.css +++ b/main/inc/lib/javascript/jquery-ui/default.css @@ -22,6 +22,11 @@ color: #212121; } +.ui-jqgrid .ui-pg-selbox { + height: 23px; +} + + /* jqgrid: Changes the row style in a table (even, odd) */ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: 1; diff --git a/main/inc/lib/pear/HTML/QuickForm.php b/main/inc/lib/pear/HTML/QuickForm.php old mode 100755 new mode 100644 index 2f6543af6b..25724675c4 --- a/main/inc/lib/pear/HTML/QuickForm.php +++ b/main/inc/lib/pear/HTML/QuickForm.php @@ -571,8 +571,7 @@ class HTML_QuickForm extends HTML_Common * @return HTML_QuickForm_Element * @throws HTML_QuickForm_Error */ - function &createElement($elementType) - { + function &createElement($elementType) { $args = func_get_args(); $element =& HTML_QuickForm::_loadElement('createElement', $elementType, array_slice($args, 1)); return $element; @@ -605,12 +604,14 @@ class HTML_QuickForm extends HTML_Common // Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3 //$elementObject =& new $className(); $elementObject = new $className(); - // + for ($i = 0; $i < 5; $i++) { if (!isset($args[$i])) { $args[$i] = null; } } + + $err = $elementObject->onQuickFormEvent($event, $args, $this); if ($err !== true) { return $err; diff --git a/main/inc/lib/pear/HTML/QuickForm/element.php b/main/inc/lib/pear/HTML/QuickForm/element.php index 5fd653d456..38d24c4234 100644 --- a/main/inc/lib/pear/HTML/QuickForm/element.php +++ b/main/inc/lib/pear/HTML/QuickForm/element.php @@ -378,6 +378,7 @@ class HTML_QuickForm_element extends HTML_Common switch ($event) { case 'createElement': $className = get_class($this); + $this->$className($arg[0], $arg[1], $arg[2], $arg[3], $arg[4]); break; case 'addElement':