Fixed the polymorphic inline script code.

Got broken in 0c7b1aa657 when removing
Djagno 1.8 compatibility
This commit is contained in:
Diederik van der Boor
2017-09-30 16:49:53 +02:00
parent 9f6e0716f6
commit 8caac2e57b
2 changed files with 32 additions and 0 deletions
@@ -52,6 +52,10 @@
var menuButton;
var addButtons;
if(options.childTypes == null) {
throw Error("The polymorphic fieldset options.childTypes is not defined!");
}
// For Polymorphic inlines, the add button opens a menu.
var menu = '<div class="polymorphic-type-menu" style="display: none;"><ul>';
for (var i = 0; i < options.childTypes.length; i++) {