From c1c7ab076697dca1a69c7034df260919dc2126e2 Mon Sep 17 00:00:00 2001 From: mak001 Date: Mon, 5 Aug 2019 15:03:44 -0500 Subject: [PATCH] Fixed content objects throwing errors in the cms --- src/Model/ContentObject.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Model/ContentObject.php b/src/Model/ContentObject.php index 7d11c98..8b17947 100644 --- a/src/Model/ContentObject.php +++ b/src/Model/ContentObject.php @@ -3,12 +3,12 @@ namespace Dynamic\CoreTools\Model; use DNADesign\Elemental\Forms\TextCheckboxGroupField; +use SilverStripe\AssetAdmin\Forms\UploadField; +use SilverStripe\Assets\Image; use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; use SilverStripe\ORM\DataObject; -use SilverStripe\AssetAdmin\Forms\UploadField; -use SilverStripe\Assets\Image; use SilverStripe\Versioned\Versioned; /** @@ -103,8 +103,11 @@ public function getCMSFields() $fields->removeByName('ShowTitle'); $fields->replaceField( 'Title', - TextCheckboxGroupField::create() - ->setName($this->fieldLabel('Title')) + TextCheckboxGroupField::create( + TextField::create('Title', _t(__CLASS__ . '.TitleLabel', 'Title (displayed if checked)')), + CheckboxField::create('ShowTitle', _t(__CLASS__ . '.ShowTitleLabel', 'Displayed')) + ) + ->setName('TitleAndDisplayed') ); $ImageField = UploadField::create('Image', 'Image')