Secondary modal for creating a new stock location when moving stock

This commit is contained in:
Oliver Walters 2019-06-06 19:28:52 +10:00
parent ad5c6630bd
commit c1f3bddf45

View File

@ -195,6 +195,18 @@ function loadStockTable(table, options) {
stock.push(item.pk);
});
// Buttons for launching secondary modals
var secondary = [];
if (action == 'move') {
secondary.push({
field: 'destination',
label: 'New Location',
title: 'Create new location',
url: "/stock/location/new/",
});
}
launchModalForm("/stock/adjust/",
{
data: {
@ -204,6 +216,7 @@ function loadStockTable(table, options) {
success: function() {
$("#stock-table").bootstrapTable('refresh');
},
secondary: secondary,
}
);
}