Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add order notes styling
dominik-zeglene39b4f0ea702
diff --git a/saleor/checkout/forms.py b/saleor/checkout/forms.pyindex 9f20a20e06..8a27620073 100644--- a/saleor/checkout/forms.py+++ b/saleor/checkout/forms.py@@ -118,7 +118,8 @@ class AnonymousUserBillingForm(forms.Form):class NoteForm(forms.Form):""" Form to add a note to an order as it iscreated for shop staff to see """- note = forms.CharField(max_length=250, required=False, strip=True)+ note = forms.CharField(max_length=250, required=False, strip=True,+ label=False)note.widget = forms.Textarea({'rows': 3})def __init__(self, *args, **kwargs):diff --git a/saleor/static/scss/layouts/_order-details.scss b/saleor/static/scss/layouts/_order-details.scssindex 1212666cae..cae42fb091 100644--- a/saleor/static/scss/layouts/_order-details.scss+++ b/saleor/static/scss/layouts/_order-details.scss@@ -34,7 +34,7 @@color: $skull-gray;}&__last-row {- border-bottom-color: $skull-gray;+ border-bottom-color: $skull-gray;}&__table-footer {@include media-breakpoint-up(sm) {@@ -42,3 +42,9 @@}}}++.order-notes {+ &__header {+ margin-top: 2 * $global-margin;+ }+}diff --git a/templates/order/details.html b/templates/order/details.htmlindex 14fbdce409..238c0b2869 100644--- a/templates/order/details.html+++ b/templates/order/details.html@@ -62,19 +62,21 @@{% endif %}{% endif %}{% include "order/_ordered_items_table.html" %}- {% if notes %}- <h2 class="mt-5">{% trans "Notes" context "Order notes list" %}</h2>- {% for note in notes %}- <p>{{note.content}}</p>- {% endfor %}- {% endif %}{% if order.status == 'open' %}- <h2>{% trans "Add a note to your order" context "Order summary add note title" %}</h2>- <form method="post" class="form-group">- {% csrf_token %}- {% bootstrap_form note_form %}- <input type="submit" value="Submit" class="btn primary" />- </form>+ {% if notes %}+ <h2 class="order-notes__header">{% trans "Notes" context "Order notes list" %}</h2>+ {% for note in notes %}+ <p>{{note.content}}</p>+ {% endfor %}+ {% endif %}+ <div class="order-notes">+ <h2 class="order-notes__header">{% trans "Add a note to your order" context "Order summary add note title" %}</h2>+ <form method="post" class="form-group">+ {% csrf_token %}+ {% bootstrap_form note_form display_labels=False %}+ <input type="submit" value="Submit" class="btn primary" />+ </form>+ </div>{% endif %}</div></div>