mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-26 11:00:27 +00:00
54 lines
1.5 KiB
HTML
54 lines
1.5 KiB
HTML
{% extends "admin2/bootstrap/base.html" %}
|
|
|
|
{% load admin2_tags %}
|
|
|
|
{% block title %}{{ action }} {{ model|model_verbose_name }}{% endblock %}
|
|
|
|
{% block page_title %}{{ action }} {{ model|model_verbose_name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
<div class="span12">
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
{{ form.as_p }}
|
|
|
|
{% for formset in inlines %}
|
|
<h4>{{ formset.model|model_verbose_name_plural|capfirst }}</h4>
|
|
{{ formset.management_form }}
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
{% for field in formset|formset_visible_fieldlist %}
|
|
<th>{{ field }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for inline_form in formset %}
|
|
<tr>
|
|
{% for field in inline_form.visible_fields %}
|
|
<td>
|
|
{% if forloop.first %}
|
|
{% for hidden_field in inline_form.hidden_fields %}
|
|
{{ hidden_field }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{{ field }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
|
|
<button class="btn btn-small" type="submit" name="_addanother">Save and add another</button>
|
|
<button class="btn btn-small" type="submit" name="_continue">Save and continue editing</button>
|
|
<button class="btn btn-small btn-success" type="submit" name="_save">Save</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock content %}
|