Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

newforms-admin: Fixed #6779 -- Removed the delete checkbox for "extra…

…" inlines. Thanks, SmileyChris.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7367 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1ed686986b72d31f88028d81b44af461e02b2d6b 1 parent 10f86fd
@brosner brosner authored
View
2  django/contrib/admin/templates/admin/edit_inline/stacked.html
@@ -6,7 +6,7 @@
{% for inline_admin_form in inline_admin_formset %}
<div class="inline-related {% if forloop.last %}last-related{% endif %}">
<h2><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b>&nbsp;{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %} #{{ forloop.counter }}{% endif %}
- {% if inline_admin_formset.formset.can_delete %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
+ {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
</h2>
{% if inline_admin_form.show_url %}
<p><a href="/r/{{ inline_admin_form.original.content_type_id }}/{{ inline_admin_form.original.id }}/">View on site</a></p>
View
2  django/contrib/admin/templates/admin/edit_inline/tabular.html
@@ -45,7 +45,7 @@
{% endfor %}
{% endfor %}
- {% if inline_admin_formset.formset.can_delete %}<td class="delete">{{ inline_admin_form.deletion_field.field }}</td>{% endif %}
+ {% if inline_admin_formset.formset.can_delete %}<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>{% endif %}
</tr>
Please sign in to comment.
Something went wrong with that request. Please try again.