Example #1
0
 /**
  * Edit the cms fields in the CMS
  *
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.Main', DateField::create('DatePublished', 'Enter a published date')->setConfig('dateformat', 'dd-MM-yyyy')->setConfig('dmyseparator', ' ')->setConfig('showcalendar', true));
     $fields->addFieldToTab('Root.Main', $uploadField = new UploadField($name = 'ArticleSummaryImage', $title = 'Upload an article summary image'));
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('Summary', 'Summary'));
     $location = new TextField('Location', 'Location');
     $fields->addFieldToTab('Root.Main', $location);
     $tagfield = TagField::create('EventTags', 'Event Tags', EventTag::get(), $this->EventTags())->setShouldLazyLoad(true)->setCanCreate(true);
     $fields->addFieldToTab('Root.Main', $tagfield);
     return $fields;
 }