reseting modal on open

This commit is contained in:
Matthias 2021-06-06 15:25:56 +02:00
parent daf3d06cf0
commit 35451248c2
2 changed files with 5 additions and 1 deletions

View File

@ -584,6 +584,10 @@ class FileManagementAjaxView(AjaxView):
return self.renderJsonResponse(request, data={'form_valid': None})
def get(self, request):
if 'reset' in request.GET:
# reset form
self.storage.reset()
self.storage.current_step = self.steps.first
self.setTemplate()
return self.renderJsonResponse(request)

View File

@ -138,7 +138,7 @@
});
$("#import-part").click(function() {
launchModalForm("{% url 'api-part-import' %}", {});
launchModalForm("{% url 'api-part-import' %}?reset", {});
});
{% endblock %}