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(),
|
||||
'component' => $this->getSchemaComponent(),
|
||||
'holderId' => $this->HolderID(),
|
||||
'title' => $this->Title(),
|
||||
'title' => $this->obj('Title')->getSchemaValue(),
|
||||
'source' => null,
|
||||
'extraClass' => $this->extraClass(),
|
||||
'description' => $this->obj('Description')->getSchemaValue(),
|
||||
'rightTitle' => $this->RightTitle(),
|
||||
'leftTitle' => $this->LeftTitle(),
|
||||
'rightTitle' => $this->obj('RightTitle')->getSchemaValue(),
|
||||
'leftTitle' => $this->obj('LeftTitle')->getSchemaValue(),
|
||||
'readOnly' => $this->isReadonly(),
|
||||
'disabled' => $this->isDisabled(),
|
||||
'customValidationMessage' => $this->getCustomValidationMessage(),
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace SilverStripe\Forms\HTMLEditor;
|
||||
|
||||
use SilverStripe\Admin\Forms\EditorExternalLinkFormFactory;
|
||||
use SilverStripe\Assets\File;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Control\Controller;
|
||||
@ -9,6 +10,7 @@ use SilverStripe\Control\Director;
|
||||
use SilverStripe\Control\RequestHandler;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Control\HTTPResponse_Exception;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\EmailField;
|
||||
@ -33,6 +35,7 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
||||
|
||||
private static $allowed_actions = array(
|
||||
'LinkForm',
|
||||
'EditorExternalLink',
|
||||
'viewfile',
|
||||
'getanchors'
|
||||
);
|
||||
@ -181,6 +184,21 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
||||
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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user