You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
826 B
27 lines
826 B
![]()
18 years ago
|
<?php
|
||
![]()
14 years ago
|
/* For licensing terms, see /license.txt */
|
||
![]()
16 years ago
|
|
||
![]()
18 years ago
|
/**
|
||
|
* A dropdownlist with all themes to use with QuickForm
|
||
|
*/
|
||
![]()
11 years ago
|
class SelectTheme extends HTML_QuickForm_select
|
||
![]()
18 years ago
|
{
|
||
|
/**
|
||
|
* Class constructor
|
||
|
*/
|
||
![]()
11 years ago
|
function SelectTheme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
|
||
![]()
14 years ago
|
if (!isset($attributes['class'])) {
|
||
![]()
14 years ago
|
//todo this was comment due a bug in infocours.php with jquery-ui
|
||
|
//$attributes['class'] = 'chzn-select';
|
||
![]()
14 years ago
|
}
|
||
![]()
18 years ago
|
parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes);
|
||
|
// Get all languages
|
||
|
$themes = api_get_themes();
|
||
|
$this->_options = array();
|
||
|
$this->_values = array();
|
||
![]()
18 years ago
|
$this->addOption('--',''); // no theme select
|
||
![]()
14 years ago
|
for ($i=0; $i< count($themes[0]);$i++) {
|
||
![]()
18 years ago
|
$this->addOption($themes[1][$i],$themes[0][$i]);
|
||
![]()
14 years ago
|
}
|
||
![]()
18 years ago
|
}
|
||
![]()
14 years ago
|
}
|