mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 09:44:38 +02:00
Update admin.php ajax response to populate new argument in ProcessController::jsonMessage()
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
* This file is designed for inclusion by /site/templates/admin.php template and all the variables
|
* This file is designed for inclusion by /site/templates/admin.php template and all the variables
|
||||||
* it references are from your template namespace.
|
* it references are from your template namespace.
|
||||||
*
|
*
|
||||||
* Copyright 2021 by Ryan Cramer
|
* Copyright 2022 by Ryan Cramer
|
||||||
*
|
*
|
||||||
* @var Config $config
|
* @var Config $config
|
||||||
* @var User $user
|
* @var User $user
|
||||||
@@ -217,7 +217,10 @@ if($ajax) {
|
|||||||
$config->js(array('httpHost', 'httpHosts', 'https'), true);
|
$config->js(array('httpHost', 'httpHosts', 'https'), true);
|
||||||
|
|
||||||
if($controller && $controller->isAjax()) {
|
if($controller && $controller->isAjax()) {
|
||||||
if(empty($content) && count($notices)) $content = $controller->jsonMessage($notices->last()->text);
|
if(empty($content) && count($notices)) {
|
||||||
|
$notice = $notices->last(); /** @var Notice $notice */
|
||||||
|
$content = $controller->jsonMessage($notice->text, false, $notice->flags & Notice::allowMarkup);
|
||||||
|
}
|
||||||
echo $content;
|
echo $content;
|
||||||
} else {
|
} else {
|
||||||
if(!strlen($content)) $content = '<p>' . __('The process returned no content.') . '</p>';
|
if(!strlen($content)) $content = '<p>' . __('The process returned no content.') . '</p>';
|
||||||
|
Reference in New Issue
Block a user