mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Improve error message for people trying to log in to the Patrons Circle
This commit is contained in:
parent
95d1b9e02e
commit
cf5f488cae
9 changed files with 104 additions and 11 deletions
|
@ -3,6 +3,8 @@
|
|||
* @var ?Exception $exception
|
||||
*/
|
||||
|
||||
use Exceptions\AppException;
|
||||
|
||||
if($exception === null){
|
||||
return;
|
||||
}
|
||||
|
@ -18,8 +20,18 @@ else{
|
|||
?>
|
||||
<ul class="message error">
|
||||
<? foreach($exceptions as $ex){ ?>
|
||||
<?
|
||||
$message = $ex->getMessage();
|
||||
if($message == ''){
|
||||
$message = 'An error occurred.';
|
||||
}
|
||||
|
||||
if(!($ex instanceof AppException) || $ex->MessageType == Enums\ExceptionMessageType::Text){
|
||||
$message = '<p>' . str_replace('CAPTCHA', '<abbr class="acronym">CAPTCHA</abbr>', Formatter::EscapeHtml($message)) . '</p>';
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<p><? $message = $ex->getMessage(); if($message == ''){ $message = 'An error occurred.'; } ?><?= str_replace('CAPTCHA', '<abbr class="acronym">CAPTCHA</abbr>', Formatter::EscapeHtml($message)) ?></p>
|
||||
<?= $message ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue