2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Replace PartAttachmentCreate form

This commit is contained in:
Oliver
2021-06-30 09:45:36 +10:00
parent 8c439e52fd
commit 238dccc071
4 changed files with 17 additions and 82 deletions

View File

@@ -21,7 +21,7 @@
enableDragAndDrop(
'#attachment-dropzone',
"{% url 'part-attachment-create' %}",
'{% url "api-part-attachment-list" %}',
{
data: {
part: {{ part.id }},
@@ -34,10 +34,23 @@
);
$("#new-attachment").click(function() {
launchModalForm("{% url 'part-attachment-create' %}?part={{ part.id }}",
constructForm(
'{% url "api-part-attachment-list" %}',
{
reload: true,
});
method: 'POST',
fields: {
attachment: {},
comment: {},
part: {
value: {{ part.pk }},
hidden: true,
}
},
reload: true,
title: '{% trans "Add Attachment" %}',
}
)
});
$("#attachment-table").on('click', '.attachment-edit-button', function() {