better show loading state when testing a policy
This commit is contained in:
parent
7fe0300b86
commit
0e425418df
|
@ -9,3 +9,18 @@
|
||||||
{% block action %}
|
{% block action %}
|
||||||
{% trans 'Test' %}
|
{% trans 'Test' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block beneath_form %}
|
||||||
|
<p class="loading" style="display: none;">
|
||||||
|
<span class="spinner spinner-xs spinner-inline"></span> {% trans 'Processing, please wait...' %}
|
||||||
|
</p>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script>
|
||||||
|
$('form').on('submit', function () {
|
||||||
|
$('p.loading').show();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
<input type="submit" class="btn btn-primary" value="{% block action %}{% endblock %}" />
|
<input type="submit" class="btn btn-primary" value="{% block action %}{% endblock %}" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{% block beneath_form %}
|
||||||
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Reference in New Issue