Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Improve discount templates
Artur Smęt43e3abda7cb4
diff --git a/saleor/dashboard/templates/dashboard/discount/form.html b/saleor/dashboard/templates/dashboard/discount/form.htmlindex 13ea6a9942..f9e2de7f3f 100644--- a/saleor/dashboard/templates/dashboard/discount/form.html+++ b/saleor/dashboard/templates/dashboard/discount/form.html@@ -43,9 +43,17 @@<div class="col l8"><div class="row">{% csrf_token %}- {{ form|materializecss }}+ {{ form.name|materializecss }}+ <div class="row">+ <div class="col s4">+ {{ form.type|materializecss }}+ </div>+ <div class="col s4">+ {{ form.value|materializecss }}+ </div>+ </div>+ {{ form.products|materializecss }}</div>-</div></div>diff --git a/saleor/dashboard/templates/dashboard/discount/modal_confirm_delete.html b/saleor/dashboard/templates/dashboard/discount/modal_confirm_delete.htmlindex be45fd7edb..9ce1b8b8e3 100644--- a/saleor/dashboard/templates/dashboard/discount/modal_confirm_delete.html+++ b/saleor/dashboard/templates/dashboard/discount/modal_confirm_delete.html@@ -6,7 +6,7 @@<h5>{% trans "Are you sure?" %}</h5><p>- {% blocktrans %}You are about to delete a discount <strong>{{ discount }}</strong>.{% endblocktrans %}+ {% blocktrans %}You are about to delete <strong>{{ discount }}</strong>.{% endblocktrans %}</p></div>diff --git a/saleor/product/models/discounts.py b/saleor/product/models/discounts.pyindex c69ad1a111..7e3c3c2a0f 100644--- a/saleor/product/models/discounts.py+++ b/saleor/product/models/discounts.py@@ -26,11 +26,7 @@ class Discount(models.Model):type = models.CharField(max_length=10, choices=DISCOUNT_TYPE_CHOICES,default=FIXED)products = models.ManyToManyField('Product', blank=True)- value = models.DecimalField(- max_digits=12, decimal_places=2, default=0,- help_text=pgettext_lazy('discount help',- 'Value for a discount. It could be fixed '- 'amount or percentage value in range 0-100'))+ value = models.DecimalField(max_digits=12, decimal_places=2, default=0)class Meta:app_label = 'product'