2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Working on custom field info in metadata class

This commit is contained in:
Oliver
2021-06-24 13:12:46 +10:00
parent 9feef935f4
commit b350a971a4
2 changed files with 81 additions and 0 deletions

View File

@ -1,3 +1,6 @@
{% load i18n %}
{% load inventree_extras %}
/**
* This file contains code for rendering (and managing) HTML forms
* which are served via the django-drf API.
@ -229,16 +232,24 @@ function constructFormBody(url, fields, options={}) {
html += f;
}
// TODO: Dynamically create the modals,
// so that we can have an infinite number of stacks!
var modal = '#modal-form';
modalEnable(modal, true);
var title = options.title || '{% trans "Form Title" %}';
modalSetTitle(modal, title);
$(modal).find('.modal-form-content').html(html);
$(modal).modal('show');
attachToggle(modal);
attachSelect(modal);
modalShowSubmitButton(modal, true);
}