mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
reseting modal on open
This commit is contained in:
parent
daf3d06cf0
commit
35451248c2
@ -584,6 +584,10 @@ class FileManagementAjaxView(AjaxView):
|
|||||||
return self.renderJsonResponse(request, data={'form_valid': None})
|
return self.renderJsonResponse(request, data={'form_valid': None})
|
||||||
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
|
if 'reset' in request.GET:
|
||||||
|
# reset form
|
||||||
|
self.storage.reset()
|
||||||
|
self.storage.current_step = self.steps.first
|
||||||
self.setTemplate()
|
self.setTemplate()
|
||||||
return self.renderJsonResponse(request)
|
return self.renderJsonResponse(request)
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#import-part").click(function() {
|
$("#import-part").click(function() {
|
||||||
launchModalForm("{% url 'api-part-import' %}", {});
|
launchModalForm("{% url 'api-part-import' %}?reset", {});
|
||||||
});
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user