dashboard_tools.html 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. {% load i18n %}
  2. <div class="background-form">
  3. <form action="{% url "jet-dashboard:add_user_dashboard_module" %}" method="POST" id="add-dashboard-module-form">
  4. {% csrf_token %}
  5. <select class="add-dashboard" name="module">
  6. <option>{% trans "widgets" %}</option>
  7. <optgroup label="{% trans "available" %}">
  8. {% for module in available_children %}
  9. <option value="{{ forloop.counter0 }}" data-type="available_children">{{ module.title }}</option>
  10. {% endfor %}
  11. </optgroup>
  12. <optgroup label="{% trans "inititals" %}">
  13. {% for module in children %}
  14. <option value="{{ forloop.counter0 }}" data-type="children">{{ module.title }}</option>
  15. {% endfor %}
  16. </optgroup>
  17. </select><a href="#" class="button button-secondary add-dashboard-link" title="{% trans "Add" %}"><span class="icon-add"></span></a>
  18. <input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
  19. <input type="hidden" name="type" value="">
  20. <a href="#" class="button button-transparent reset-dashboard-link" title="{% trans "Reset widgets" %}"><span class="icon-reset"></span></a>
  21. </form>
  22. <form action="{% url "jet-dashboard:reset_dashboard" %}" method="POST" id="reset-dashboard-form">
  23. {% csrf_token %}
  24. <input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
  25. </form>
  26. <div class="dialog-confirm" id="reset-dashboard-dialog" title="{% trans "Reset widgets" %}">
  27. <p>{% trans "Are you sure want to reset widgets?" %}</p>
  28. </div>
  29. </div>