Forum: better error messages (Suggested by @anyeor)

This commit is contained in:
slawkens
2023-07-07 14:34:26 +02:00
parent c392fa7272
commit 8cf0e80019
9 changed files with 82 additions and 42 deletions

View File

@@ -1580,6 +1580,14 @@ function getGuildLogoById($id)
return BASE_URL . GUILD_IMAGES_DIR . $logo;
}
function displayErrorBoxWithBackButton($errors, $action = null) {
global $twig;
$twig->display('error_box.html.twig', ['errors' => $errors]);
$twig->display('account.back_button.html.twig', [
'action' => $action ?: getLink('')
]);
}
// validator functions
require_once LIBS . 'validator.php';
require_once SYSTEM . 'compat/base.php';