From 432e369990369af911f824a6a0aedf9b5ae3f8ee Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 19 Apr 2024 11:46:34 -0400 Subject: [PATCH] Minor adjustments in ProcessPageTrash --- wire/modules/Process/ProcessPageTrash.module | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wire/modules/Process/ProcessPageTrash.module b/wire/modules/Process/ProcessPageTrash.module index 68245c06..e9a208e7 100644 --- a/wire/modules/Process/ProcessPageTrash.module +++ b/wire/modules/Process/ProcessPageTrash.module @@ -8,7 +8,7 @@ * For more details about how Process modules work, please see: * /wire/core/Process.php * - * ProcessWire 3.x, Copyright 2022 by Ryan Cramer + * ProcessWire 3.x, Copyright 2024 by Ryan Cramer * https://processwire.com * */ @@ -46,7 +46,7 @@ class ProcessPageTrash extends Process { return $this->render(); } - $this->session->CSRF->validate(); + $this->wire()->session->CSRF->validate(); $options = array( 'verbose' => true, @@ -112,6 +112,9 @@ class ProcessPageTrash extends Process { $this->_n('Permanently delete %d page in the trash?', 'Permanently delete %d pages in the trash?', $trashTotal), $trashTotal ); + $field->description = $this->_('Pages emptied from the trash are deleted from the database and file system, and can no longer be restored.'); + $field->themeOffset = 1; + $field->icon = 'trash-o'; if($trashTotal > 100) { $field->notes = $this->_("If there are too many items in the trash, you may have to empty it multiple times."); } @@ -127,6 +130,7 @@ class ProcessPageTrash extends Process { $pageList->set('id', $this->config->trashPageID); $pageList->set('showRootPage', false); $field->value = $pageList->execute(); + $field->themeOffset = 1; $form->add($field); /** @var InputfieldInteger $f */ @@ -158,4 +162,3 @@ class ProcessPageTrash extends Process { return $form->render(); } } -