﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14660	Using a CheckboxSelectMultiple widget on a M to M field in Admin causes 'SelectBox is not defined' JS error in RelatedObjectLookups.js	sloggz	nobody	"
(Using Django 1.2.1)

Form and Model given like so:

forms.py:

{{{

class PictureGalleryForm(ModelForm):    
    class Meta:
        model=PictureGallery
        widgets = {
            'pictures' : CheckboxSelectMultiple,
        
        }


}}}


models.py:

{{{

class GalleryCommon(models.Model):
    date_created = models.DateTimeField(auto_now_add=True)
    date_updated = models.DateTimeField(auto_now=True)
    title = models.CharField(max_length=256)
    
    class Meta:
        abstract = True

class PictureGallery(GalleryCommon):
    pictures = models.ManyToManyField(Picture, related_name=""pic_gallery"", help_text=""Select Gallery Images."")
    
    def __unicode__(self):
        return (self.title)
}}}



To encounter the error, register PictureGallery with admin using the PictureGalleryForm and click the green plus arrow to add a picture.
On clicking the save button in the popup admin window, the picture will save, but the popup will hang at line 92 of RelatedObjectLookup.js .

The error is 'SelectBox is not defined.'

Assume this occurs because somehow the 'if' statement at line 76 goes wrong.

As best I can tell this is similar to tickets #7133, #5731, and #10191 but not the same."	Bug	closed	contrib.admin	1.2	Normal	fixed			Accepted	0	0	0	0	0	0
