Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Make parent a hidden field in category form
Marcin Gębalaedc5c77eca4e
diff --git a/saleor/dashboard/category/forms.py b/saleor/dashboard/category/forms.pyindex e219cae187..75fb4b060c 100644--- a/saleor/dashboard/category/forms.py+++ b/saleor/dashboard/category/forms.py@@ -9,7 +9,7 @@ from ...product.models import Categoryclass CategoryForm(forms.ModelForm):parent = TreeNodeChoiceField(queryset=Category.objects.all(),- required=False)+ required=False, widget=forms.HiddenInput())def __init__(self, *args, **kwargs):super(CategoryForm, self).__init__(*args, **kwargs)diff --git a/saleor/dashboard/templates/dashboard/category/detail.html b/saleor/dashboard/templates/dashboard/category/detail.htmlindex 1a5abeb164..d956b8a0b4 100644--- a/saleor/dashboard/templates/dashboard/category/detail.html+++ b/saleor/dashboard/templates/dashboard/category/detail.html@@ -29,6 +29,7 @@<div class="row"><div class="col l8"><div class="row">+ {{ form.parent }}{{ form.name|materializecss:"s8 m10" }}{{ form.hidden|materializecss:"s4 m2" }}{{ form.description|materializecss }}diff --git a/saleor/dashboard/templates/dashboard/category/list.html b/saleor/dashboard/templates/dashboard/category/list.htmlindex db903ea01f..57c3c9f5a1 100644--- a/saleor/dashboard/templates/dashboard/category/list.html+++ b/saleor/dashboard/templates/dashboard/category/list.html@@ -134,6 +134,7 @@<h5>{% trans "Edit" %} {{ root }}</h5><div class="row">+ {{ form.parent }}{{ form.name|materializecss:"s8 m10" }}{{ form.hidden|materializecss:"s4 m2" }}{{ form.description|materializecss }}