diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index 5cee2f4426..da5524fb39 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -135,7 +135,7 @@
-

{% trans "Notes" %}

+

{% trans "Part Notes" %}

{% include "spacer.html" %}
{% include "notes_buttons.html" %} @@ -418,7 +418,7 @@ 'part-notes', '{% url "api-part-detail" part.pk %}', { - editable: true, + editable: {% if roles.part.change %}true{% else %}false{% endif %}, } ); }); diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html index 40d99577f9..632f9e523a 100644 --- a/InvenTree/stock/templates/stock/item.html +++ b/InvenTree/stock/templates/stock/item.html @@ -133,24 +133,16 @@
-
-
-

{% trans "Stock Item Notes" %}

-
-
-
- -
+
+

{% trans "Stock Item Notes" %}

+ {% include "spacer.html" %} +
+ {% include "notes_buttons.html" %}
- {% if item.notes %} - {{ item.notes | markdownify }} - {% endif %} +
@@ -235,18 +227,21 @@ reload: true, } ); - }); - $('#edit-notes').click(function() { - constructForm('{% url "api-stock-detail" item.pk %}', { - fields: { - notes: { - multiline: true, - } - }, - title: '{% trans "Edit Notes" %}', - reload: true, - }); + }); + + onPanelLoad('notes', function() { + setupNotesField( + 'stock-notes', + '{% url "api-stock-detail" item.pk %}', + { + {% if roles.stock.change and user_owns_item %} + editable: true, + {% else %} + editable: false, + {% endif %} + } + ); }); enableDragAndDrop(