From 27e2c839640d9afdb48f24412fc313eeae4347b6 Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@gmail.com>
Date: Tue, 1 Nov 2022 23:47:07 +1100
Subject: [PATCH] Hide "install plugin" button if plugins are not enabled

---
 InvenTree/templates/InvenTree/settings/plugin.html | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html
index 0eae518e26..d36bf7cf2d 100644
--- a/InvenTree/templates/InvenTree/settings/plugin.html
+++ b/InvenTree/templates/InvenTree/settings/plugin.html
@@ -38,7 +38,10 @@
         <div class='btn-group' role='group'>
             {% url 'admin:plugin_pluginconfig_changelist' as url %}
             {% include "admin_button.html" with url=url %}
+            {% plugins_enabled as plug %}
+            {% if plug %}
             <button class="btn btn-success" id="install-plugin" title="{% trans 'Install Plugin' %}"><span class='fas fa-plus-circle'></span> {% trans "Install Plugin" %}</button>
+            {% endif %}
         </div>
     </div>
 </div>