2
0
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:
Oliver Walters
2019-05-14 23:27:45 +10:00
parent 97c4e5acbf
commit 9d50f2a6ac
3 changed files with 46 additions and 39 deletions

View File

@ -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' %}",
}
]
});