/**
  * Class constructor
  */
 function HTML_QuickForm_Select_Theme($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';
     }
     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++) {
         $this->addOption($themes[1][$i], $themes[0][$i]);
     }
 }
 /**
  * Class constructor
  */
 function HTML_QuickForm_Select_Language($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
     $languages = api_get_languages();
     $this->_options = array();
     $this->_values = array();
     foreach ($languages['name'] as $index => $name) {
         if ($languages['folder'][$index] == api_get_setting('platformLanguage')) {
             $this->addOption($name, $languages['folder'][$index], array('selected' => 'selected'));
         } else {
             $this->addOption($name, $languages['folder'][$index]);
         }
     }
 }
示例#3
0
 /**
  * Class constructor
  */
 function HTML_QuickForm_Select_Language($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
     $languages = api_get_languages();
     $this->_options = array();
     $this->_values = array();
     $platformLanguage = Container::getTranslator()->getLocale();
     foreach ($languages as $language) {
         if ($language['isocode'] == $platformLanguage) {
             $this->addOption($language['english_name'], $language['isocode'], array('selected' => 'selected'));
         } else {
             $this->addOption($language['english_name'], $language['isocode']);
         }
     }
 }
示例#4
0
 /**
  * Class constructor
  */
 function HTML_QuickForm_Select_Ajax($elementName = null, $elementLabel = null, $options = null, $attributes = null)
 {
     parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes);
 }