secondary modal for part form

This commit is contained in:
Oliver Walters 2021-08-08 00:44:46 +10:00
parent 1dc5682767
commit 4e6c8c45ee
2 changed files with 24 additions and 2 deletions

View File

@ -17,7 +17,16 @@ function yesNoLabel(value) {
function partFields(options={}) {
var fields = {
category: {},
category: {
secondary: {
title: '{% trans "Add Part Category" %}',
fields: function(data) {
var fields = categoryFields();
return fields;
}
}
},
name: {},
IPN: {},
revision: {},
@ -30,7 +39,8 @@ function partFields(options={}) {
link: {
icon: 'fa-link',
},
default_location: {},
default_location: {
},
default_supplier: {},
default_expiry: {
icon: 'fa-calendar-alt',

View File

@ -2,6 +2,18 @@
{% load inventree_extras %}
{% load status_codes %}
function locationFields() {
return {
parent: {
help_text: '{% trans "Parent stock location" %}',
},
name: {},
description: {},
};
}
/* Stock API functions
* Requires api.js to be loaded first
*/