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:
@@ -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')
|
||||
|
Reference in New Issue
Block a user