mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Extend security area with Ajax controller
This commit is contained in:
parent
ecf6afd33a
commit
abcca72aa3
@ -17,6 +17,10 @@ PageController:
|
||||
- A2nt\CMSNiceties\Extensions\PageControllerEx
|
||||
- A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx
|
||||
|
||||
SilverStripe\Security\Security:
|
||||
extensions:
|
||||
- A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx
|
||||
|
||||
SilverStripe\CMS\Model\SiteTree:
|
||||
default_container_class: 'container'
|
||||
extensions:
|
||||
|
@ -68,7 +68,12 @@ class AjaxControllerEx extends Extension
|
||||
$ctrl = $this->owner;
|
||||
|
||||
/* @var Form $form */
|
||||
if (method_exists($ctrl, 'LoginForm')) {
|
||||
$form = $ctrl->LoginForm();
|
||||
} else {
|
||||
$form = $ctrl->getLoginForms()['default'][0];
|
||||
}
|
||||
|
||||
self::_processFields($form);
|
||||
|
||||
//$form->addExtraClass('ajax-form');
|
||||
|
Loading…
Reference in New Issue
Block a user