Fixed #9341: add another on `ManyToManyField`s with `raw_id_admins` now works correctly.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2009-04-08 19:57:27 +00:00
parent 7d1b4295b9
commit 6eaf154a2e
1 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,11 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
elem.options[elem.options.length] = o;
o.selected = true;
} else if (elem.nodeName == 'INPUT') {
elem.value = newId;
if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) {
elem.value += ',' + newId;
} else {
elem.value = newId;
}
}
} else {
var toId = name + "_to";