diff --git a/InvenTree/common/views.py b/InvenTree/common/views.py index af3f7fea94..2abe53d380 100644 --- a/InvenTree/common/views.py +++ b/InvenTree/common/views.py @@ -143,7 +143,7 @@ class MultiStepFormView(SessionWizardView): try: # Get template - template = self.form_steps_template[int(self.steps.current)] + template = self.form_steps_template[self.steps.index] except IndexError: return self.template_name @@ -157,7 +157,7 @@ class MultiStepFormView(SessionWizardView): # Get form description try: - description = self.form_steps_description[int(self.steps.current)] + description = self.form_steps_description[self.steps.index] except IndexError: description = '' # Add description to form steps diff --git a/InvenTree/order/forms.py b/InvenTree/order/forms.py index b1e5745937..858679ffdf 100644 --- a/InvenTree/order/forms.py +++ b/InvenTree/order/forms.py @@ -295,16 +295,14 @@ class UploadFile(forms.Form): help_text=_('Select order file to upload'), ) - file_manager = None - def clean_file(self): file = self.cleaned_data['file'] # Create a FileManager object - will perform initial data validation # (and raise a ValidationError if there is something wrong with the file) - self.file_manager = FileManager(file=file, name='order') + file_manager = FileManager(file=file, name='order') - return file + return file_manager class MatchField(forms.Form): diff --git a/InvenTree/order/templates/order/order_wizard/match_fields.html b/InvenTree/order/templates/order/order_wizard/match_fields.html index 818f986850..1ac1f30997 100644 --- a/InvenTree/order/templates/order/order_wizard/match_fields.html +++ b/InvenTree/order/templates/order/order_wizard/match_fields.html @@ -3,8 +3,7 @@ {% load i18n %} {% load static %} -{% block form %} - +{% block form_alert %} {% if missing_columns and missing_columns|length > 0 %}
{% trans "Step" %} {{ wizard.steps.step1 }} {% trans "of" %} {{ wizard.steps.count }} {% if description %}- {{ description }}{% endif %}
-{% block form %} +{% block form_alert %} +{% endblock form_alert %} -