update_module.html 4.0 KB

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