コード例 #1
0
 /**
  * sets up the null select for dropdown elements
  */
 protected function _set_null_select()
 {
     $field = Participants_Db::get_column($this->name);
     $default = '';
     if ($field) {
         $default = $field->default;
     }
     /*
      * this is to add a blank mull select option if there is no default, no defined 
      * null select and no set field value
      */
     if (self::is_empty($default) && !isset($this->options['null_select']) && self::is_empty($this->value)) {
         $this->options['null_select'] = '';
     }
     parent::_set_null_select();
 }
コード例 #2
0
 /**
  * builds a rich-text editor (textarea) element
  */
 protected function _rich_text_field()
 {
     if (!is_admin() and !Participants_Db::$plugin_options['rich_text_editor']) {
         $this->_text_field();
     } else {
         parent::_rich_text_field();
     }
 }