From 5aa11063a0a3fbfcf95a923434a2f4cce9b14176 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 26 Aug 2020 23:13:32 +1000 Subject: [PATCH] Add function to update the 'options' for a given field in a modal --- .../static/script/inventree/modals.js | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/InvenTree/InvenTree/static/script/inventree/modals.js b/InvenTree/InvenTree/static/script/inventree/modals.js index a455e8f9d3..a17e148416 100644 --- a/InvenTree/InvenTree/static/script/inventree/modals.js +++ b/InvenTree/InvenTree/static/script/inventree/modals.js @@ -52,6 +52,41 @@ function makeOptionsList(elements, textFunc, valueFunc, titleFunc) { } +function setFieldOptions(fieldName, optionList, options={}) { + /* Set the options for a