Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use checkbox widget for selecting variant images
Marcin Gębala33ad91611533
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.pyindex 7146285197..ae7fdae248 100644--- a/saleor/dashboard/product/forms.py+++ b/saleor/dashboard/product/forms.py@@ -3,6 +3,7 @@ from __future__ import unicode_literalsfrom django import formsfrom django.db.models import Countfrom django.forms.models import ModelChoiceIterator, inlineformset_factory+from django.forms.widgets import CheckboxSelectMultiplefrom django.utils.encoding import smart_textfrom django.utils.text import slugifyfrom django.utils.translation import pgettext_lazy@@ -248,7 +249,9 @@ class ProductImageForm(forms.ModelForm):class VariantImagesSelectForm(forms.Form):images = forms.ModelMultipleChoiceField(- queryset=VariantImage.objects.none())+ queryset=VariantImage.objects.none(),+ widget=CheckboxSelectMultiple,+ required=False)def __init__(self, *args, **kwargs):self.variant = kwargs.pop('variant')