mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Deleted unused form
This commit is contained in:
parent
f90ffcd3db
commit
5963f7ed01
@ -51,18 +51,6 @@ class BomUploadSelectFile(HelperForm):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class BomUploadSelectFields(HelperForm):
|
|
||||||
""" Form for selecting BOM fields """
|
|
||||||
|
|
||||||
starting_row = forms.IntegerField(required=True, initial=2, help_text='Index of starting row', validators=[MinValueValidator(1)])
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
model = Part
|
|
||||||
fields = [
|
|
||||||
'starting_row',
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class EditPartAttachmentForm(HelperForm):
|
class EditPartAttachmentForm(HelperForm):
|
||||||
""" Form for editing a PartAttachment object """
|
""" Form for editing a PartAttachment object """
|
||||||
|
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
|
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
|
||||||
<button type="submit" class="save btn btn-default">Submit Selections</button>
|
<button type="submit" class="save btn btn-default">Submit Selections</button>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% load crispy_forms_tags %}
|
|
||||||
|
|
||||||
{% crispy form %}
|
|
||||||
|
|
||||||
<input type='hidden' name='form_step' value='select_fields'/>
|
<input type='hidden' name='form_step' value='select_fields'/>
|
||||||
|
|
||||||
|
@ -671,11 +671,6 @@ class BomUpload(FormView):
|
|||||||
|
|
||||||
def get_form_class(self):
|
def get_form_class(self):
|
||||||
|
|
||||||
form_step = self.request.POST.get('form_step', None)
|
|
||||||
|
|
||||||
if form_step == 'select_fields':
|
|
||||||
return part_forms.BomUploadSelectFields
|
|
||||||
else:
|
|
||||||
# Default form is the starting point
|
# Default form is the starting point
|
||||||
return part_forms.BomUploadSelectFile
|
return part_forms.BomUploadSelectFile
|
||||||
|
|
||||||
@ -776,7 +771,7 @@ class BomUpload(FormView):
|
|||||||
|
|
||||||
if bom_file_valid:
|
if bom_file_valid:
|
||||||
# BOM file is valid? Proceed to the next step!
|
# BOM file is valid? Proceed to the next step!
|
||||||
form = part_forms.BomUploadSelectFields
|
form = None
|
||||||
self.template_name = 'part/bom_upload/select_fields.html'
|
self.template_name = 'part/bom_upload/select_fields.html'
|
||||||
|
|
||||||
self.extractDataFromFile(manager)
|
self.extractDataFromFile(manager)
|
||||||
@ -984,8 +979,6 @@ class BomUpload(FormView):
|
|||||||
|
|
||||||
valid = len(self.missing_columns) == 0 and not self.duplicates
|
valid = len(self.missing_columns) == 0 and not self.duplicates
|
||||||
|
|
||||||
form = part_forms.BomUploadSelectFields
|
|
||||||
|
|
||||||
if valid:
|
if valid:
|
||||||
# Try to extract meaningful data
|
# Try to extract meaningful data
|
||||||
self.preFillSelections()
|
self.preFillSelections()
|
||||||
@ -994,7 +987,7 @@ class BomUpload(FormView):
|
|||||||
else:
|
else:
|
||||||
self.template_name = 'part/bom_upload/select_fields.html'
|
self.template_name = 'part/bom_upload/select_fields.html'
|
||||||
|
|
||||||
return self.render_to_response(self.get_context_data(form=form))
|
return self.render_to_response(self.get_context_data(form=None))
|
||||||
|
|
||||||
def handlePartSelection(self):
|
def handlePartSelection(self):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user