Skip to content

Commit a03f675

Browse files
committed
Fixed #13026 - Also update the index of lookup links when adding inlines dynmacially in the admin. Thanks to ramusus and Rob Hudson for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 45a56e6 commit a03f675

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

django/contrib/admin/media/js/inlines.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
// last child element of the form's container:
7272
$(row).children(":first").append('<span><a class="' + options.deleteCssClass + '" href="javascript:void(0)">' + options.deleteText + "</a></span>");
7373
}
74-
$(row).find("input,select,textarea,label").each(function() {
74+
$(row).find("input,select,textarea,label,a").each(function() {
7575
updateElementIndex(this, options.prefix, totalForms.val());
7676
});
7777
// Update number of total forms
@@ -100,7 +100,7 @@
100100
// so they remain in sequence:
101101
for (var i=0, formCount=forms.length; i<formCount; i++)
102102
{
103-
$(forms.get(i)).find("input,select,textarea,label").each(function() {
103+
$(forms.get(i)).find("input,select,textarea,label,a").each(function() {
104104
updateElementIndex(this, options.prefix, i);
105105
});
106106
}

django/contrib/admin/media/js/inlines.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)