Skip to content

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

Extend functionality of adding notes in dashboard

akjanik82f1a8560fc8
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.py
index 6007d291fc..e0ba1c7954 100644
--- a/saleor/dashboard/order/forms.py
+++ b/saleor/dashboard/order/forms.py
@@ -26,13 +26,14 @@ from ..widgets import PhonePrefixWidget
class OrderNoteForm(forms.ModelForm):
class Meta:
model = OrderNote
- fields = ['content']
+ fields = ['content', 'is_public']
widgets = {
'content': forms.Textarea()}
labels = {
- 'content': pgettext_lazy(
- 'Order note',
- 'Note')}
+ 'content': pgettext_lazy('Order note', 'Note'),
+ 'is_public': pgettext_lazy(
+ 'Allow customers to see note toggle',
+ 'Customer can see this note ')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
diff --git a/templates/order/details.html b/templates/order/details.html
index 6db1e99b58..eda82001cc 100644
--- a/templates/order/details.html
+++ b/templates/order/details.html
@@ -50,7 +50,7 @@
{% endblocktrans %}
</h2>
- {% if order.notes.count %}
+ {% if notes %}
<h2>{% trans "Notes" context "Order notes list" %}</h2>
{% for note in notes %}
<p>{{note.content}}</p>