diff --git a/octoprint_customControl/__init__.py b/octoprint_customControl/__init__.py index 779f060..fd31657 100644 --- a/octoprint_customControl/__init__.py +++ b/octoprint_customControl/__init__.py @@ -18,6 +18,16 @@ class CustomControlPlugin(octoprint.plugin.SettingsPlugin, controls = [] ) + def get_template_configs(self): + if "editorcollection" in self._plugin_manager.enabled_plugins: + return [ + dict(type="plugin_editorcollection_EditorCollection", template="customControl_hookedsettings.jinja2", custom_bindings=True) + ] + else: + return [ + dict(type="settings", template="customControl_hookedsettings.jinja2", custom_bindings=True) + ] + def on_settings_save(self, data): s = settings() s.set(["controls"], data["controls"]) diff --git a/octoprint_customControl/templates/customControl_settings.jinja2 b/octoprint_customControl/templates/customControl_hookedsettings.jinja2 similarity index 97% rename from octoprint_customControl/templates/customControl_settings.jinja2 rename to octoprint_customControl/templates/customControl_hookedsettings.jinja2 index d59e31b..404325b 100644 --- a/octoprint_customControl/templates/customControl_settings.jinja2 +++ b/octoprint_customControl/templates/customControl_hookedsettings.jinja2 @@ -1,6 +1,6 @@

{{ _('Control') }}

-
+
@@ -46,33 +46,33 @@ - - - + +