2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-04 01:35:54 +00:00

Display existing images in a form

This commit is contained in:
Oliver Walters
2020-02-10 22:57:36 +11:00
parent a82e219336
commit 17c10da10e
5 changed files with 77 additions and 6 deletions

View File

@@ -601,8 +601,8 @@ class PartQRCode(QRCodeView):
return None
class PartImage(AjaxUpdateView):
""" View for uploading Part image """
class PartImageUpload(AjaxUpdateView):
""" View for uploading a new Part image """
model = Part
ajax_template_name = 'modal_form.html'
@@ -622,6 +622,10 @@ class PartImageSelect(AjaxUpdateView):
ajax_template_name = 'part/select_image.html'
ajax_form_title = _('Select Part Image')
fields = [
'image',
]
def get_data(self):
return {
'success': _('Selected part image')