diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py
index d3a5ee919d..24ba9278c8 100644
--- a/InvenTree/InvenTree/settings.py
+++ b/InvenTree/InvenTree/settings.py
@@ -163,7 +163,7 @@ LOGGING = {
},
}
-MIDDLEWARE = [
+MIDDLEWARE = CONFIG.get('middleware', [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
@@ -173,9 +173,12 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
-
'InvenTree.middleware.AuthRequiredMiddleware'
-]
+])
+
+AUTHENTICATION_BACKENDS = CONFIG.get('authentication_backends', [
+ 'django.contrib.auth.backends.ModelBackend'
+])
# If the debug toolbar is enabled, add the modules
if DEBUG and CONFIG.get('debug_toolbar', False):
diff --git a/InvenTree/InvenTree/static/script/inventree/modals.js b/InvenTree/InvenTree/static/script/inventree/modals.js
index 5b76203927..e0a24b4e4f 100644
--- a/InvenTree/InvenTree/static/script/inventree/modals.js
+++ b/InvenTree/InvenTree/static/script/inventree/modals.js
@@ -1,7 +1,136 @@
-function makeOption(id, title) {
+function makeOption(text, value, title) {
/* Format an option for a select element
*/
- return "";
+
+ var html = ``;
+
+ return html;
+}
+
+function makeOptionsList(elements, textFunc, valueFunc, titleFunc) {
+ /*
+ * Programatically generate a list of