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\Extensions\PageControllerEx
|
||||||
- A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx
|
- A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx
|
||||||
|
|
||||||
|
SilverStripe\Security\Security:
|
||||||
|
extensions:
|
||||||
|
- A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx
|
||||||
|
|
||||||
SilverStripe\CMS\Model\SiteTree:
|
SilverStripe\CMS\Model\SiteTree:
|
||||||
default_container_class: 'container'
|
default_container_class: 'container'
|
||||||
extensions:
|
extensions:
|
||||||
|
|
|
@ -68,7 +68,12 @@ class AjaxControllerEx extends Extension
|
||||||
$ctrl = $this->owner;
|
$ctrl = $this->owner;
|
||||||
|
|
||||||
/* @var Form $form */
|
/* @var Form $form */
|
||||||
|
if (method_exists($ctrl, 'LoginForm')) {
|
||||||
$form = $ctrl->LoginForm();
|
$form = $ctrl->LoginForm();
|
||||||
|
} else {
|
||||||
|
$form = $ctrl->getLoginForms()['default'][0];
|
||||||
|
}
|
||||||
|
|
||||||
self::_processFields($form);
|
self::_processFields($form);
|
||||||
|
|
||||||
//$form->addExtraClass('ajax-form');
|
//$form->addExtraClass('ajax-form');
|
||||||
|
|
Loading…
Reference in New Issue