better show loading state when testing a policy
This commit is contained in:
		| @ -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
	
	Block a user
	 Jens Langhammer
					Jens Langhammer