2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Adds a "persist" option for modal forms

This commit is contained in:
Oliver
2022-03-01 00:25:14 +11:00
parent 7170e16ae7
commit 42a75863fe
2 changed files with 43 additions and 8 deletions

View File

@ -313,6 +313,10 @@
fields: fields,
groups: partGroups(),
title: '{% trans "Create Part" %}',
reloadFormAfterSuccess: true,
persist: true,
persistMessage: '{% trans "Create another part after this one" %}',
successMessage: '{% trans "Part created successfully" %}',
onSuccess: function(data) {
// Follow the new part
location.href = `/part/${data.pk}/`;