2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-26 05:15:55 +00:00

Replace PartAttachmentEdit view

This commit is contained in:
Oliver
2021-06-30 09:49:30 +10:00
parent 238dccc071
commit b946aedb5c
5 changed files with 21 additions and 32 deletions

View File

@@ -154,27 +154,6 @@ class PartRelatedDelete(AjaxDeleteView):
role_required = 'part.change'
class PartAttachmentEdit(AjaxUpdateView):
""" View for editing a PartAttachment object """
model = PartAttachment
form_class = part_forms.EditPartAttachmentForm
ajax_template_name = 'modal_form.html'
ajax_form_title = _('Edit attachment')
def get_data(self):
return {
'success': _('Part attachment updated')
}
def get_form(self):
form = super(AjaxUpdateView, self).get_form()
form.fields['part'].widget = HiddenInput()
return form
class PartAttachmentDelete(AjaxDeleteView):
""" View for deleting a PartAttachment """