public function getCMSFields() { $return = parent::getCMSFields(); $return->addFieldsToTab('Root.Main', [new ColorPaletteField('BackgroundColor', $this->fieldLabel('BackgroundColor'), ['grey-light' => '#F6F6F6', 'white' => '#FFF', 'blue-dark' => '#015790'])], 'Content'); $return->addFieldToTab('Root.Main', HtmlEditorField::create('AfterContent', 'Text to appear after the sponsors')); return $return; }
public function getCMSFields() { $return = parent::getCMSFields(); $return->removeByName('ShowTitle'); $return->removeByName('ShowBorder'); $return->removeByName('ScrollDownButtonTitle'); $return->addFieldsToTab('Root.Main', [new TextField('Latitude', $this->fieldLabel('Latitude')), new TextField('Longitude', $this->fieldLabel('Longitude')), new DropdownField('Size', $this->fieldLabel('Size'), ['small' => _t('SectionMap.SizeSmall', 'small'), 'medium' => _t('SectionMap.SizeMedium', 'medium'), 'large' => _t('SectionMap.SizeLarge', 'large'), 'full' => _t('SectionMap.SizeFull', 'full')])], 'Content'); return $return; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldsToTab('Root.Main', [ColorPaletteField::create('BackgroundColor', $this->fieldLabel('BackgroundColor'), ['grey-light' => '#F6F6F6', 'white' => '#FFF', 'blue-dark' => '#015790'])], 'Content'); $gridFieldConfig = GridFieldConfig_RecordEditor::create(); $gridFieldConfig->addComponent(new GridFieldOrderableRows('SortOrder')); $field = GridField::create('Galeries', 'Galleries', $this->Galleries()->sort('SortOrder'), $gridFieldConfig); $fields->addFieldToTab("Root.Galleries", $field); return $fields; }
public function getCMSFields() { $return = parent::getCMSFields(); $return->addFieldsToTab('Root.Main', [new ColorPaletteField('BackgroundColor', $this->fieldLabel('BackgroundColor'), ['grey-light' => '#F6F6F6', 'white' => '#FFF', 'blue-dark' => '#015790'])], 'Content'); return $return; }
public function getCMSFields() { $return = parent::getCMSFields(); $return->addFieldsToTab('Root.Main', [new ColorPaletteField('BackgroundColor', $this->fieldLabel('BackgroundColor'), ['transparent' => '#FFF; background-image: linear-gradient(45deg, grey 25%, transparent 25%, transparent 75%, grey 75%, grey), linear-gradient(45deg, grey 25%, transparent 25%, transparent 75%, grey 75%, grey); background-size: 20px 20px; background-position: 0 0, 10px 10px;', 'blue' => '#015790; background-color: rgba(1, 87, 144, .5);']), new DropdownField('Size', $this->fieldLabel('Size'), ['small' => _t('SectionBanner.SizeSmall', 'small'), 'medium' => _t('SectionBanner.SizeMedium', 'medium'), 'large' => _t('SectionBanner.SizeLarge', 'large'), 'full' => _t('SectionBanner.SizeFull', 'full')]), (new UploadField('BackgroundImage', $this->fieldLabel('BackgroundImage')))->setAllowedFileCategories('image')->setFolderName('banner')]); return $return; }