Adds secondary to manufacturerpart form

This commit is contained in:
Oliver Walters 2021-08-07 23:49:50 +10:00
parent 94c1ed882f
commit 720b332f71

View File

@ -30,6 +30,17 @@ function createManufacturerPart(options={}) {
fields.manufacturer.value = options.manufacturer; fields.manufacturer.value = options.manufacturer;
} }
fields.manufacturer.secondary = {
title: '{% trans "Add Manufacturer" %}',
fields: function(data) {
var company_fields = companyFormFields();
company_fields.is_manufacturer.value = true;
return company_fields;
}
}
constructForm('{% url "api-manufacturer-part-list" %}', { constructForm('{% url "api-manufacturer-part-list" %}', {
fields: fields, fields: fields,
method: 'POST', method: 'POST',