2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
rocheparadox
2021-10-11 22:29:01 +05:30
60 changed files with 31319 additions and 27914 deletions

View File

@ -35,6 +35,18 @@ function bomItemFields() {
hidden: true,
},
sub_part: {
secondary: {
title: '{% trans "New Part" %}',
fields: function() {
var fields = partFields();
// Set to a "component" part
fields.component.value = true;
return fields;
},
groups: partGroups(),
}
},
quantity: {},
reference: {},
@ -576,6 +588,7 @@ function loadBomTable(table, options) {
constructForm(`/api/bom/${pk}/`, {
fields: fields,
title: '{% trans "Edit BOM Item" %}',
focus: 'sub_part',
onSuccess: function() {
reloadBomTable(table);
}

View File

@ -43,7 +43,7 @@ function createNewModal(options={}) {
});
var html = `
<div class='modal fade modal-fixed-footer modal-primary inventree-modal' role='dialog' id='modal-form-${id}'>
<div class='modal fade modal-fixed-footer modal-primary inventree-modal' role='dialog' id='modal-form-${id}' tabindex='-1'>
<div class='modal-dialog'>
<div class='modal-content'>
<div class="modal-header">
@ -111,7 +111,7 @@ function createNewModal(options={}) {
$(modal_name).modal({
backdrop: 'static',
keyboard: false,
keyboard: user_settings.FORMS_CLOSE_USING_ESCAPE,
});
// Set labels based on supplied options
@ -681,7 +681,7 @@ function openModal(options) {
$(modal).modal({
backdrop: 'static',
keyboard: false,
keyboard: user_settings.FORMS_CLOSE_USING_ESCAPE,
});
// Disable the form