2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 13:35:40 +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

@ -90,25 +90,20 @@
category: {{ category.id }}
{% endif %}
},
after_render: function(modal, response) {
attachSecondaryModal(modal,
{
field: 'category',
label: 'New Category',
title: 'Create new Part Category',
url: "{% url 'category-create' %}",
}
);
attachSecondaryModal(modal,
{
field: 'default_location',
label: 'New Location',
title: 'Create new Stock Location',
url: "{% url 'stock-location-create' %}",
}
);
}
secondary: [
{
field: 'category',
label: 'New Category',
title: 'Create new Part Category',
url: "{% url 'category-create' %}",
},
{
field: 'default_location',
label: 'New Location',
title: 'Create new Stock Location',
url: "{% url 'stock-location-create' %}",
}
]
}
);
});