Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Move directly to prod form if only one prod class
Paweł Kowalewskie6a59b014ed1
diff --git a/saleor/dashboard/templates/dashboard/product/list.html b/saleor/dashboard/templates/dashboard/product/list.htmlindex ad5350c3d4..898862dfab 100644--- a/saleor/dashboard/templates/dashboard/product/list.html+++ b/saleor/dashboard/templates/dashboard/product/list.html@@ -10,10 +10,25 @@{% block header_extra %}<div class="fixed-action-btn">- <a class="btn-fab btn-floating btn-large waves-effect waves-light teal modal-trigger"- href="#modal-product-class" title="{% trans "Add product" %}">- <i class="mdi-content-add"></i>- </a>+ {% if form.product_cls.1 %}+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal modal-trigger"+ href="#modal-product-class" title="{% trans "Add product" %}">+ <i class="mdi-content-add"></i>+ </a>+ {% else %}+ <form method="post" action=".">+ <div hidden>+ {% csrf_token %}+ {{ form }}+ </div>++ <button type="submit" class="btn-fab btn-floating btn-large waves-effect waves-light teal"+ title="{% trans "Add product" %}">+ <i class="mdi-content-add"></i>+ </button>+ </form>+ {% endif %}+</div>{% endblock %}