remove magic

This commit is contained in:
Jean-Christian Paul Denis 2023-04-23 20:56:00 +02:00
parent 73bd0522d4
commit 18d2bda75a
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -68,19 +68,25 @@ class BackendBehaviors
); );
echo echo
(new Form('plocd'))->method('post')->action($pa->getURI())->fields([ (new Form('plocd'))
->__call('method', ['post'])
->__call('action', [$pa->getURI()])
->__call('fields', [[
(new Text('', $pa->getCheckboxes())), (new Text('', $pa->getCheckboxes())),
(new Text('p', __('Are you sure you want to delete all comments?'))), (new Text('p', __('Are you sure you want to delete all comments?'))),
(new Para())->items(array_merge( (new Para())
->__call('items', [array_merge(
[ [
(new Submit(['do']))->value(__('yes')), (new Submit(['do']))
->__call('value', [__('yes')]),
dcCore::app()->formNonce(false), dcCore::app()->formNonce(false),
(new Hidden(['action'], 'commentsdelete')), (new Hidden(['action'], 'commentsdelete')),
(new Hidden(['confirmdeletecomments'], '1')), (new Hidden(['confirmdeletecomments'], '1')),
], ],
$pa->hiddenFields(), $pa->hiddenFields(),
)), )]),
])->render(); ]])
->render();
$pa->endPage(); $pa->endPage();
} else { } else {
@ -130,19 +136,22 @@ class BackendBehaviors
); );
echo echo
(new Form('plotd'))->method('post')->action($pa->getURI())->fields([ (new Form('plotd'))
->__call('method', ['post'])
->__call('action', [$pa->getURI()])
->__call('fields', [[
(new Text('', $pa->getCheckboxes())), (new Text('', $pa->getCheckboxes())),
(new Text('p', __('Are you sure you want to delete all trackbacks?'))), (new Text('p', __('Are you sure you want to delete all trackbacks?'))),
(new Para())->items(array_merge( (new Para())
[ ->__call('items', [array_merge([
(new Submit(['do']))->value(__('yes')), (new Submit(['do']))
->__call('value', [__('yes')]),
dcCore::app()->formNonce(false), dcCore::app()->formNonce(false),
(new Hidden(['action'], 'trackbacksdelete')), (new Hidden(['action'], 'trackbacksdelete')),
(new Hidden(['confirmdeletetrackbacks'], '1')), (new Hidden(['confirmdeletetrackbacks'], '1')),
], ], $pa->hiddenFields())]),
$pa->hiddenFields(), ]])
)), ->render();
])->render();
$pa->endPage(); $pa->endPage();
} else { } else {