Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix a few more small remarks
oldPadavan71ad8689dd8b
diff --git a/saleor/order/views.py b/saleor/order/views.pyindex 0d3b79ee31..c5ae51a0b3 100644--- a/saleor/order/views.py+++ b/saleor/order/views.py@@ -25,23 +25,23 @@ logger = logging.getLogger(__name__)def details(request, token):+ note_form = Noneorders = Order.objects.confirmed().prefetch_related('lines__variant', 'fulfillments', 'fulfillments__lines','fulfillments__lines__order_line')orders = orders.select_related('billing_address', 'shipping_address', 'user')order = get_object_or_404(orders, token=token)- ctx = {'order': order}if order.is_open() and not order.customer_note:note_form = CustomerNoteForm(request.POST or None, instance=order)- ctx.update({'note_form': note_form})if request.method == 'POST':if note_form.is_valid():note_form.save()return redirect('order:details', token=order.token)fulfillments = order.fulfillments.filter(status=FulfillmentStatus.FULFILLED)- ctx.update({'fulfillments': fulfillments})+ ctx = {+ 'order': order, 'fulfillments': fulfillments, 'note_form': note_form}return TemplateResponse(request, 'order/details.html', ctx)diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.htmlindex 15e90246e2..7c5f107a7d 100644--- a/templates/dashboard/order/detail.html+++ b/templates/dashboard/order/detail.html@@ -528,7 +528,7 @@<p>{{ order.customer_note }}</p>{% else %}<p>- {% trans "There's no note from customer associated with this order." context "No customer order note card message" %}+ {% trans "There is no note from the customer associated with this order." context "No customer order note card message" %}</p>{% endif %}</div>diff --git a/templates/order/details.html b/templates/order/details.htmlindex 025319b899..7e631c0161 100644--- a/templates/order/details.html+++ b/templates/order/details.html@@ -64,12 +64,13 @@{% include "order/_ordered_items_table.html" %}<div class="order-notes">{% if order.customer_note %}- <h2 class="order-notes__header">{% trans "Customer note" context "Customer order note" %}</h2>+ <h2 class="order-notes__header">{% trans "Your note" context "Customer order note" %}</h2><p>{{ order.customer_note }}</p>{% endif %}{% if order.is_open and not order.customer_note %}<form method="post" class="form-group">{% csrf_token %}+ <h2>{% trans "Add a note to your order" context "Order note title" %}</h2>{% bootstrap_form note_form display_labels=False %}<input type="submit" value="{% trans 'Submit note' context 'Customer panel - order details: add note submit button' %}" class="btn primary" /></form>