Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Disable unpublish toggle for homepage collection
oldPadavan13b7f7434975
diff --git a/templates/dashboard/collection/detail.html b/templates/dashboard/collection/detail.htmlindex 8aa1a3cdcc..025651bc18 100644--- a/templates/dashboard/collection/detail.html+++ b/templates/dashboard/collection/detail.html@@ -89,7 +89,8 @@<form id="toggle-publish-form" action="{% url 'dashboard:collection-publish' pk=collection.pk %}"><div class="switch" id="collection-is-published"><label>- <input id="toggle-publish-switch" type="checkbox" {% if collection.is_published %} checked {% endif %}>+ <input id="toggle-publish-switch" type="checkbox" {% if collection.is_published %} checked {% endif %}+ {% if site.settings.homepage_collection == collection and collection.is_published %} disabled {% endif %} ><span class="lever"></span><span class="label">{% if collection.is_published %}@@ -102,6 +103,9 @@</div>{% csrf_token %}</form>+ {% if site.settings.homepage_collection == collection and collection.is_published %}+ <div class="label label-default">{% trans "Can't unpublish homepage collection" context "Collection field" %}</div>+ {% endif %}<h5>{% render_collection_availability collection %}</h5></div></div>