コード例 #1
0
 /**
  * Builds the form field, sets default attributes, and includes JS
  *
  * @param array $attributes The attributes to include on the formfield
  * @return SSViewer
  */
 public function FieldHolder($attributes = array())
 {
     Requirements::javascript(FRAMEWORK_DIR . "/admin/thirdparty/chosen/chosen/chosen.jquery.js");
     Requirements::css(FRAMEWORK_DIR . "/admin/thirdparty/chosen/chosen/chosen.css");
     $this->addExtraClass('chosen');
     if (!$this->getAttribute('data-search-threshold')) {
         $this->setSearchThreshold(self::$default_search_threshold);
     }
     return parent::FieldHolder($attributes);
 }