Permalink
Browse files

[1.2.X] Fixed #13674 -- Ensure that labels on added inlines fields ha…

…ve the right 'for' attribute. Thanks to Jonas for the report, and Julien Phalip for the patch.

Backport of r15436 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent cd2a1a0 commit 5f0ed3e1987de5abe654f8b90b6179381eb94195 @freakboy3742 freakboy3742 committed Feb 6, 2011
Showing with 14 additions and 6 deletions.
  1. +8 −0 django/contrib/admin/media/js/inlines.js
  2. +6 −6 django/contrib/admin/media/js/inlines.min.js
@@ -75,6 +75,14 @@
}).each(function() {
var el = $(this);
el.attr("name", el.attr("name").replace(/__prefix__/g, nextIndex));
+ })
+ .end()
+ .filter(function() {
+ var el = $(this);
+ return el.attr("for") && el.attr("for").search(/__prefix__/) >= 0;
+ }).each(function() {
+ var el = $(this);
+ el.attr("for", el.attr("for").replace(/__prefix__/g, nextIndex));
});
if (row.is("tr")) {
// If the forms are laid out in table rows, insert

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 5f0ed3e

Please sign in to comment.