diff --git a/src/BackendList.php b/src/BackendList.php index 6597062..ea89719 100644 --- a/src/BackendList.php +++ b/src/BackendList.php @@ -17,9 +17,9 @@ namespace Dotclear\Plugin\dcLog; use ArrayObject; use adminGenericListV2; use dcPager; +use Dotclear\Helper\Html\Html; +use Dotclear\Helper\Html\Form\Checkbox; use dt; -use form; -use html; class BackendList extends adminGenericListV2 { @@ -77,28 +77,28 @@ class BackendList extends adminGenericListV2 { $cols = [ 'check' => '
' . __('There are no logs') . '
'; + echo (new Text('p', __('There are no logs')))->render(); } else { $current->filter->display( 'admin.plugin.' . My::id(), - form::hidden('p', My::id()) + (new Hidden(['p'], My::id()))->render() ); $current->list->display( (int) $current->filter->__get('page'), (int) $current->filter->__get('nb'), - '', + (new Form('form-entries'))->action(dcCore::app()->adminurl->get('admin.plugin.' . My::id()))->method('post')->fields([ + (new Text('', '%s')), + (new Div())->class('two-cols')->items([ + (new Para())->class('col checkboxes-helpers'), + (new Para())->class('col right')->separator(' ')->items([ + (new Submit(['selected_logs']))->class('delete')->value(__('Delete selected logs')), + (new Submit(['all_logs']))->class('delete')->value(__('Delete all logs')), + ]), + (new Text('', + dcCore::app()->adminurl?->getHiddenFormFields('admin.plugin.' . My::id(), $current->filter->values()) . + dcCore::app()->formNonce() + )), + ]), + ])->render(), $current->filter->show() ); }