mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 07:47:00 +02:00
Minor adjustments in ProcessPageTrash
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user