Disable reload button and show spinner on click

This commit is contained in:
Gina Häußge 2017-03-30 15:50:32 +02:00
parent f1cf482919
commit a01b9fe8d4

View file

@ -11,7 +11,7 @@
web interface now by clicking the button below.
{% endtrans %}</p>
<p>
<a class="btn btn-primary btn-large" title="{{ _('Reload now') }}" href="javascript:void(0)" onclick="location.reload(true); return false;">{{ _('Reload now') }}</a>
<button class="btn btn-primary btn-large" title="{{ _('Reload now') }}" onclick="var event = arguments[0] || window.event; var source = event.target || event.srcElement; if (source.disabled) return; source.disabled = true; source.className += ' disabled'; source.firstChild.style.display = ''; location.reload(true); return false;"><i class="icon-spinner icon-spin" style="display: none"></i> {{ _('Reload now') }}</button>
</p>
</div>
</div>