Commit 6eaf154a authored by Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss
Browse files

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
parent 7d1b4295
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -79,8 +79,12 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
            elem.options[elem.options.length] = o;
            o.selected = true;
        } else if (elem.nodeName == 'INPUT') {
            if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) {
                elem.value += ',' + newId;
            } else {
                elem.value = newId;
            }
        }
    } else {
        var toId = name + "_to";
        elem = document.getElementById(toId);