public function getCMSFields()
 {
     $this->beforeUpdateCMSFields(function ($fields) {
         $uploadField = UploadField::create('Image', 'Image')->setAllowedFileCategories('image')->setAllowedMaxFileNumber(1)->setFolderName('Uploads/images');
         $fields->addFieldToTab('Root.Main', $uploadField);
         $caption = HTMLEditorField::create('Caption', 'Caption');
         $caption->setRightTitle('Optional');
         $fields->addFieldToTab('Root.Main', $caption);
     });
     return parent::getCMSFields();
 }
Exemplo n.º 2
0
 public function __construct($label, array $sources, $flags = null, $searchOp = null)
 {
     parent::__construct($label, $sources, 'showUpdate', array(), $flags, null, $searchOp);
 }
Exemplo n.º 3
0
 function cssSelector($append = '', $nestingLevel = null)
 {
     return parent::cssSelector(($this->parent->quickDelete ? '.ajax' : '.lightbox') . $append, $nestingLevel);
 }
Exemplo n.º 4
0
 public function val($sources = null)
 {
     $this->parent->clearId();
     $link = parent::val($sources);
     return $link;
 }