Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use bootstrap panels in product detail view

Marcin Gębala0379eb38beff
diff --git a/saleor/dashboard/templates/dashboard/product/product_form.html b/saleor/dashboard/templates/dashboard/product/product_form.html
index 0c14bbfdc5..989e7caac1 100644
--- a/saleor/dashboard/templates/dashboard/product/product_form.html
+++ b/saleor/dashboard/templates/dashboard/product/product_form.html
@@ -18,35 +18,54 @@
<span class="message-content">{% trans "Data saved" %}</span>
</div>
<form method="post" action="." id="product-form" enctype="multipart/form-data">
- <div class="box">
- <div class="box-header">{% trans "Product data" %}</div>
- {% csrf_token %}
- {{ form|as_vertical_form }}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <span class="panel-title">{% trans "Product data" %}</span>
+ </div>
+ <div class="panel-body">
+ {% csrf_token %}
+ {{ form|as_vertical_form }}
+ </div>
+ </div>
- </div>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <span class="panel-title">Inventory</span>
+ </div>
+ <div class="panel-body">
+ {{ stock_formset.as_p }}
+ </div>
+ </div>
+
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <span class="panel-title">Images</span>
+ </div>
+ <div class="panel-body">
+ {{ image_formset.as_p }}
+ </div>
+ </div>
+
+ <div class="form-group">
+ <button type="submit" class="btn btn-primary">Save</button>
+ <a href="{% url 'dashboard:products' %}" class="btn btn-link">Cancel</a>
+ </div>
- <div class="box">
- <div class="box-header">Inventory</div>
- {{ stock_formset.as_p }}
- </div>
- <div class="box">
- <div class="box-header">Images</div>
- {{ image_formset.as_p }}
- </div>
- <div class="box">
- <input type="submit" class="btn btn-primary" value="Save" />
- </div>
</form>
</div>
<div class="col-lg-4">
- <div class="box">
- <div class="box-header">Product image</div>
- {% if product.images.exists %}
- <img class="img-responsive" src="{{ product.images.first|at_size:"small" }}" alt="">
- {% else %}
- <img class="img-responsive" src="http://placehold.it/300x300/&text=Product Image" alt="">
- {% endif %}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <span class="panel-title">Product image</span>
+ </div>
+ <div class="panel-body">
+ {% if product.images.exists %}
+ <img class="img-responsive" src="{{ product.images.first|at_size:"small" }}" alt="">
+ {% else %}
+ <img class="img-responsive" src="http://placehold.it/300x300/&text=Product Image" alt="">
+ {% endif %}
+ </div>
</div>
</div>
</div>