Skip to content

Commit

Permalink
Fixed #18477 -- Fixed colspan value when a TabularInline form contain…
Browse files Browse the repository at this point in the history
…s validation errors. Thanks to yedpodtrzitko for the report and patch.
  • Loading branch information
jphalip committed Jun 16, 2012
1 parent 1794e36 commit 1ace912
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django/contrib/admin/static/admin/js/inlines.js
Expand Up @@ -44,7 +44,7 @@
if ($(this).attr("tagName") == "TR") {
// If forms are laid out as table rows, insert the
// "add" button in a new table row:
var numCols = this.eq(0).children().length;
var numCols = this.eq(-1).children().length;
$(this).parent().append('<tr class="' + options.addCssClass + '"><td colspan="' + numCols + '"><a href="javascript:void(0)">' + options.addText + "</a></tr>");
addButton = $(this).parent().find("tr:last a");
} else {
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admin/static/admin/js/inlines.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ace912

Please sign in to comment.