display captcha loading and unavailable images

This commit is contained in:
samuel 2022-06-06 17:32:12 +02:00
parent 78b3171872
commit c53b8fef90
5 changed files with 3 additions and 3 deletions

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -151,7 +151,7 @@ window.addEventListener('load', _ => {
$("#captchaImage").attr("src", "/assets/img/captcha/"+data.id+".png"); $("#captchaImage").attr("src", "/assets/img/captcha/"+data.id+".png");
$("#captchaId").val(data.id); $("#captchaId").val(data.id);
}).fail(_ => { }).fail(_ => {
$("#captchaImage").attr("src", ""); $("#captchaImage").attr("src", "/assets/img/captcha/unavailable.png");
$("#captchaId").val(); $("#captchaId").val();
}); });
} }

View File

@ -314,9 +314,9 @@
<!-- Captcha image--> <!-- Captcha image-->
<div> <div>
<span class="d-inline-block"> <span class="d-inline-block">
<img src="" alt="captcha error" id="captchaImage"> <img src="/assets/img/captcha/loading.png" alt="captcha error" id="captchaImage">
</span> </span>
<span id="captchaReload" role="button"> <span id="captchaReload" role="button" class="text-primary">
<i class="fas fa-rotate-right"></i> <i class="fas fa-rotate-right"></i>
</span> </span>
<input type="hidden" id="captchaId"> <input type="hidden" id="captchaId">