Deleted unused form

This commit is contained in:
Oliver Walters 2019-08-14 13:54:16 +10:00
parent f90ffcd3db
commit 5963f7ed01
3 changed files with 4 additions and 26 deletions

View File

@ -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):
""" Form for editing a PartAttachment object """

View File

@ -24,9 +24,6 @@
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
<button type="submit" class="save btn btn-default">Submit Selections</button>
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
<input type='hidden' name='form_step' value='select_fields'/>

View File

@ -671,11 +671,6 @@ class BomUpload(FormView):
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
return part_forms.BomUploadSelectFile
@ -776,7 +771,7 @@ class BomUpload(FormView):
if bom_file_valid:
# 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.extractDataFromFile(manager)
@ -984,8 +979,6 @@ class BomUpload(FormView):
valid = len(self.missing_columns) == 0 and not self.duplicates
form = part_forms.BomUploadSelectFields
if valid:
# Try to extract meaningful data
self.preFillSelections()
@ -994,7 +987,7 @@ class BomUpload(FormView):
else:
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):