update_module.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n jet_tags static %}
  3. {% block extrahead %}
  4. {{ block.super }}
  5. <script type="text/javascript" src="{% static "admin/js/jquery.js" %}"></script>
  6. <script type="text/javascript" src="{% static "admin/js/jquery.init.js" %}"></script>
  7. <script type="text/javascript" src="{% static "admin/js/inlines.js" %}"></script>
  8. {% endblock %}
  9. {% if not is_popup %}
  10. {% block breadcrumbs %}
  11. <div class="breadcrumbs">
  12. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  13. {% if app %}
  14. &rsaquo; <a href="{{ app.app_url }}">{% if app.name != app.app_label|capfirst|escape %}{{ app.name }}{% else %}{% trans app.app_label as app_label %}{{ app_label|capfirst|escape }}{% endif %}</a>
  15. {% endif %}
  16. &rsaquo; {{ object.title|capfirst }}
  17. </div>
  18. {% endblock %}
  19. {% endif %}
  20. {% block bodyclass %}{{ block.super }} dashboard jet change-form{% endblock %}
  21. {% block content %}
  22. <div id="content-main">
  23. {% block object-tools %}{% endblock %}
  24. <form action="" method="post" novalidate>{% csrf_token %}{% block form_top %}{% endblock %}
  25. <div>
  26. {% if form.errors or settings_form.errors %}
  27. <p class="errornote">{% trans "Please correct the errors below." %}</p>
  28. {% endif %}
  29. {% block field_sets %}
  30. <fieldset class="module aligned">
  31. {% include "jet.dashboard/update_module_fieldset.html" with form=form wrap=False %}
  32. {% if settings_form %}
  33. {% include "jet.dashboard/update_module_fieldset.html" with form=settings_form wrap=False %}
  34. {% endif %}
  35. </fieldset>
  36. {% endblock %}
  37. {% block after_field_sets %}{% endblock %}
  38. {% block inline_field_sets %}
  39. {% if children_formset %}
  40. <div class="inline-group">
  41. <fieldset class="module">
  42. <h2>{{ child_name_plural }}</h2>
  43. {{ children_formset.management_form }}
  44. {{ children_formset.non_form_errors }}
  45. {% for form in children_formset %}
  46. <div class="inline-related{% if forloop.last %} empty-form last-related{% else %} has_original{% endif %}">
  47. <h3>
  48. <b>{{ child_name|capfirst }}:</b>&nbsp;<span class="inline_label">#{{ forloop.counter }}</span>
  49. {% if forloop.last %}
  50. <span><a href="#" class="inline-deletelink">{% trans "Delete" %}</a></span>
  51. {% elif children_formset.can_delete %}
  52. <span class="delete"><label>{{ form.DELETE }} {% trans "Delete" %}</label></span>
  53. {% endif %}
  54. </h3>
  55. {% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %}
  56. {% include "jet.dashboard/update_module_fieldset.html" with form=form %}
  57. </div>
  58. {% endfor %}
  59. {% with child_name as verbose_name %}
  60. <div class="add-row">
  61. <a href="#">{% blocktrans %}Add another {{ verbose_name }}{% endblocktrans %}</a>
  62. </div>
  63. {% endwith %}
  64. </fieldset>
  65. </div>
  66. {% endif %}
  67. {% endblock %}
  68. {% block after_related_objects %}{% endblock %}
  69. {% block submit_buttons_bottom %}
  70. <div class="submit-row">
  71. <input type="submit" value="{% trans 'Save' %}" class="default" name="_save" />
  72. </div>
  73. {% endblock %}
  74. {% block admin_change_form_document_ready %}{% endblock %}
  75. </div>
  76. </form>
  77. </div>
  78. {% endblock %}