Adds a "persist" option for modal forms

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

No files matched your search

@@ -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}/`;