2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00
This commit is contained in:
Oliver Walters
2021-02-22 16:48:00 +11:00
parent bf51e1bfb1
commit 7d54997cb8
3 changed files with 25 additions and 3 deletions

View File

@ -114,6 +114,18 @@ function selectLabel(labels, items, options={}) {
* (via AJAX) from the server.
*/
// If only a single label template is provided,
// just run with that!
if (labels.length == 1) {
if (options.success) {
options.success(labels[0].pk);
}
return;
}
var modal = options.modal || '#modal-form';
var label_list = makeOptionsList(