Skip to content

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

Improve file input field in product image form

Paweł Kowalewski7c03d4085c4a
diff --git a/saleor/dashboard/templates/dashboard/product/product_image_form.html b/saleor/dashboard/templates/dashboard/product/product_image_form.html
index 2c11dcaf30..c878034967 100644
--- a/saleor/dashboard/templates/dashboard/product/product_image_form.html
+++ b/saleor/dashboard/templates/dashboard/product/product_image_form.html
@@ -39,9 +39,11 @@
<form method="post" enctype="multipart/form-data">
<div class="row">
<div class="col l8">
+ {% csrf_token %}
+ {{ form.image }}
+
<div class="row">
- {% csrf_token %}
- {{ form|materializecss }}
+ {{ form.alt|materializecss }}
<input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">
</div>
</div>
diff --git a/saleor/static/scss/widget/_form.scss b/saleor/static/scss/widget/_form.scss
index 1d01d02937..3de61ac80a 100644
--- a/saleor/static/scss/widget/_form.scss
+++ b/saleor/static/scss/widget/_form.scss
@@ -64,6 +64,18 @@
@extend %input-lg;
}
}
+
+ .versatileimagefield {
+ margin-bottom: $gutter-width/2;
+
+ .sizedimage-mod {
+ margin-bottom: $gutter-width/2;
+
+ label {
+ margin-bottom: 5px;
+ }
+ }
+ }
}
form {