mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Toot toot all aboard the refactor tractor
- launchModalForm now accepts a 'secondary' parameter which is a list of secondary modals to attach
This commit is contained in:
@ -124,26 +124,20 @@
|
||||
location: {{ location.id }}
|
||||
{% endif %}
|
||||
},
|
||||
after_render: function(modal, response) {
|
||||
|
||||
attachSecondaryModal(modal,
|
||||
{
|
||||
field: 'part',
|
||||
label: 'New Part',
|
||||
title: 'Create New Part',
|
||||
url: "{% url 'part-create' %}",
|
||||
}
|
||||
);
|
||||
|
||||
attachSecondaryModal(modal,
|
||||
{
|
||||
field: 'location',
|
||||
label: 'New Location',
|
||||
title: 'Create New Location',
|
||||
url: "{% url 'stock-location-create' %}",
|
||||
}
|
||||
);
|
||||
}
|
||||
secondary: [
|
||||
{
|
||||
field: 'part',
|
||||
label: 'New Part',
|
||||
title: 'Create New Part',
|
||||
url: "{% url 'part-create' %}",
|
||||
},
|
||||
{
|
||||
field: 'location',
|
||||
label: 'New Location',
|
||||
title: 'Create New Location',
|
||||
url: "{% url 'stock-location-create' %}",
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user