mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix change titles to return schema values in schema
Enhancement Add EditorExternalLink call for toolbar
This commit is contained in:
parent
4af71b9ed7
commit
403f4db14d
@ -1534,12 +1534,12 @@ class FormField extends RequestHandler
|
|||||||
'schemaType' => $this->getSchemaDataType(),
|
'schemaType' => $this->getSchemaDataType(),
|
||||||
'component' => $this->getSchemaComponent(),
|
'component' => $this->getSchemaComponent(),
|
||||||
'holderId' => $this->HolderID(),
|
'holderId' => $this->HolderID(),
|
||||||
'title' => $this->Title(),
|
'title' => $this->obj('Title')->getSchemaValue(),
|
||||||
'source' => null,
|
'source' => null,
|
||||||
'extraClass' => $this->extraClass(),
|
'extraClass' => $this->extraClass(),
|
||||||
'description' => $this->obj('Description')->getSchemaValue(),
|
'description' => $this->obj('Description')->getSchemaValue(),
|
||||||
'rightTitle' => $this->RightTitle(),
|
'rightTitle' => $this->obj('RightTitle')->getSchemaValue(),
|
||||||
'leftTitle' => $this->LeftTitle(),
|
'leftTitle' => $this->obj('LeftTitle')->getSchemaValue(),
|
||||||
'readOnly' => $this->isReadonly(),
|
'readOnly' => $this->isReadonly(),
|
||||||
'disabled' => $this->isDisabled(),
|
'disabled' => $this->isDisabled(),
|
||||||
'customValidationMessage' => $this->getCustomValidationMessage(),
|
'customValidationMessage' => $this->getCustomValidationMessage(),
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\Forms\HTMLEditor;
|
namespace SilverStripe\Forms\HTMLEditor;
|
||||||
|
|
||||||
|
use SilverStripe\Admin\Forms\EditorExternalLinkFormFactory;
|
||||||
use SilverStripe\Assets\File;
|
use SilverStripe\Assets\File;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
use SilverStripe\Control\Controller;
|
use SilverStripe\Control\Controller;
|
||||||
@ -9,6 +10,7 @@ use SilverStripe\Control\Director;
|
|||||||
use SilverStripe\Control\RequestHandler;
|
use SilverStripe\Control\RequestHandler;
|
||||||
use SilverStripe\Control\HTTPRequest;
|
use SilverStripe\Control\HTTPRequest;
|
||||||
use SilverStripe\Control\HTTPResponse_Exception;
|
use SilverStripe\Control\HTTPResponse_Exception;
|
||||||
|
use SilverStripe\Core\Injector\Injector;
|
||||||
use SilverStripe\Forms\CheckboxField;
|
use SilverStripe\Forms\CheckboxField;
|
||||||
use SilverStripe\Forms\CompositeField;
|
use SilverStripe\Forms\CompositeField;
|
||||||
use SilverStripe\Forms\EmailField;
|
use SilverStripe\Forms\EmailField;
|
||||||
@ -33,6 +35,7 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
|||||||
|
|
||||||
private static $allowed_actions = array(
|
private static $allowed_actions = array(
|
||||||
'LinkForm',
|
'LinkForm',
|
||||||
|
'EditorExternalLink',
|
||||||
'viewfile',
|
'viewfile',
|
||||||
'getanchors'
|
'getanchors'
|
||||||
);
|
);
|
||||||
@ -180,7 +183,22 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
|||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds and returns the external link form
|
||||||
|
*
|
||||||
|
* @return null|Form
|
||||||
|
*/
|
||||||
|
public function EditorExternalLink()
|
||||||
|
{
|
||||||
|
/** @var EditorExternalLinkFormFactory $factory */
|
||||||
|
$factory = Injector::inst()->get(EditorExternalLinkFormFactory::class);
|
||||||
|
if ($factory) {
|
||||||
|
return $factory->getForm($this->controller, "{$this->name}/EditorExternalLink");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the folder ID to filter files by for the "from cms" tab
|
* Get the folder ID to filter files by for the "from cms" tab
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user