/** * @param string $title * @param string $post_var */ public function __construct($title, $post_var) { global $tpl, $ilUser, $lng; if (substr($post_var, -2) != '[]') { $post_var = $post_var . '[]'; } parent::__construct($title, $post_var); $this->lng = $lng; $this->pl = ilUserDefaultsPlugin::getInstance(); $tpl->addJavaScript('./Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/lib/select2/select2.min.js'); $tpl->addJavaScript('./Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/lib/select2/select2_locale_' . $ilUser->getCurrentLanguage() . '.js'); $tpl->addCss('./Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/lib/select2/select2.css'); $this->setInputTemplate($this->pl->getTemplate('tpl.multiple_select.html')); $this->setWidth('300px'); }