src/Forms/ReviewContentHandler.php
public function Form($object)
    {
        $placeholder = _t(__CLASS__ . '.Placeholder', 'Add comments (optional)');
        $title = _t(__CLASS__ . '.MarkAsReviewedAction', 'Mark as reviewed');

        $fields = FieldList::create([
            HiddenField::create('ID', null, $object->ID),
            HiddenField::create('ClassName', null, $object->baseClass()),
            TextareaField::create('Review', '')
                ->setAttribute('placeholder', $placeholder)
                ->setSchemaData(['attributes' => ['placeholder' => $placeholder]])
        ]);

        $action = FormAction::create('savereview', $title)
            ->setTitle($title)
            ->setUseButtonTag(false)
            ->addExtraClass('review-content__action btn btn-primary');
        $actions = FieldList::create([$action]);

        $form = Form::create($this->controller, $this->name, $fields, $actions)
            ->setHTMLID('Form_EditForm_ReviewContent')
            ->addExtraClass('form--no-dividers review-content__form');

        return $form;
    }
public function Form($object)
    {
        $placeholder = _t(__CLASS__ . '.Placeholder', 'Add comments (optional)');
        $title = _t(__CLASS__ . '.MarkAsReviewedAction', 'Mark as reviewed');

        $fields = FieldList::create([
            HiddenField::create('ID', null, $object->ID),
            HiddenField::create('ClassName', null, $object->baseClass()),
            TextareaField::create('Review', '')
                ->setAttribute('placeholder', $placeholder)
                ->setSchemaData(['attributes' => ['placeholder' => $placeholder]])
        ]);

        $action = FormAction::create('savereview', $title)
            ->setTitle($title)
            ->setUseButtonTag(false)
            ->addExtraClass('review-content__action btn btn-primary');
        $actions = FieldList::create([$action]);

        $form = Form::create($this->controller, $this->name, $fields, $actions)
            ->setHTMLID('Form_EditForm_ReviewContent')
            ->addExtraClass('form--no-dividers review-content__form');

        return $form;
    }
public function Form ( $ object ) { $ placeholder = _t ( __CLASS__ . '.Placeholder' , 'Add comments (optional)' ) ; $ title = _t ( __CLASS__ . '.MarkAsReviewedAction' , 'Mark as reviewed' ) ; $ fields = FieldList :: create ( [ HiddenField :: create ( 'ID' , null , $ object -> ID ) , HiddenField :: create ( 'ClassName' , null , $ object -> baseClass ( ) ) , TextareaField :: create ( 'Review' , '' ) -> setAttribute ( 'placeholder' , $ placeholder ) -> setSchemaData ( [ 'attributes' => [ 'placeholder' => $ placeholder ] ] ) ] ) ; $ action = FormAction :: create ( 'savereview' , $ title ) -> setTitle ( $ title ) -> setUseButtonTag ( false ) -> addExtraClass ( 'review-content__action btn btn-primary' ) ; $ actions = FieldList :: create ( [ $ action ] ) ; $ form = Form :: create ( $ this -> controller , $ this -> name , $ fields , $ actions ) -> setHTMLID ( 'Form_EditForm_ReviewContent' ) -> addExtraClass ( 'form--no-dividers review-content__form' ) ; return $ form ; }
Bootstrap the form fields for the content review modal

@param DataObject $object
@return Form
Bootstrap the form fields for the content review modal