mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Enhancement add EmailLink form factory server-side
This commit is contained in:
parent
c58dc97d39
commit
edcb220e4a
@ -3,6 +3,7 @@
|
|||||||
namespace SilverStripe\Forms\HTMLEditor;
|
namespace SilverStripe\Forms\HTMLEditor;
|
||||||
|
|
||||||
use SilverStripe\Admin\Forms\EditorExternalLinkFormFactory;
|
use SilverStripe\Admin\Forms\EditorExternalLinkFormFactory;
|
||||||
|
use SilverStripe\Admin\Forms\EditorEmailLinkFormFactory;
|
||||||
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;
|
||||||
@ -36,6 +37,7 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
|||||||
private static $allowed_actions = array(
|
private static $allowed_actions = array(
|
||||||
'LinkForm',
|
'LinkForm',
|
||||||
'EditorExternalLink',
|
'EditorExternalLink',
|
||||||
|
'EditorEmailLink',
|
||||||
'viewfile',
|
'viewfile',
|
||||||
'getanchors'
|
'getanchors'
|
||||||
);
|
);
|
||||||
@ -199,6 +201,22 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds and returns the external link form
|
||||||
|
*
|
||||||
|
* @return null|Form
|
||||||
|
*/
|
||||||
|
public function EditorEmailLink($id = null)
|
||||||
|
{
|
||||||
|
/** @var EditorEmailLinkFormFactory $factory */
|
||||||
|
$factory = Injector::inst()->get(EditorEmailLinkFormFactory::class);
|
||||||
|
|
||||||
|
if ($factory) {
|
||||||
|
return $factory->getForm($this->controller, "{$this->name}/EditorEmailLink");
|
||||||
|
}
|
||||||
|
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…
Reference in New Issue
Block a user