Skip to content

Commit

Permalink
Merge pull request #177 from mak001/bugfix-content-object-title-field
Browse files Browse the repository at this point in the history
Fixed content objects throwing errors in the cms
  • Loading branch information
muskie9 authored Aug 5, 2019
2 parents 8eb3e72 + c1c7ab0 commit f35a416
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Model/ContentObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit f35a416

Please sign in to comment.