Permalink
Browse files

Fixed #13674 -- Ensure that labels on added inlines fields have the r…

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 5582ad1 commit 7494345c39162c9052894125ee7af37e1f18adb2 @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
Oops, something went wrong.

0 comments on commit 7494345

Please sign in to comment.