diff --git a/AUTHORS.md b/AUTHORS.md index 6542ddb5b..e21cba6b2 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -167,6 +167,7 @@ date of first contribution): * [Nicu Surdu](https://github.com/surdu) * [Zack Lewis](https://github.com/lima3w) * [Billy Richardson](https://github.com/richardsondev) + * [Christian Bianchini](https://github.com/max246) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index ab6958b79..1e8b15d8f 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -772,7 +772,9 @@ class SoftwareUpdatePlugin( def on_settings_save(self, data): # ~~ plugin settings - for key in self.get_settings_defaults(): + defaults = self.get_settings_defaults() + + for key in defaults: if key in ( "checks", "cache_ttl", @@ -782,6 +784,7 @@ class SoftwareUpdatePlugin( "octoprint_checkout_folder", "octoprint_type", "octoprint_release_channel", + "credentials", ): continue if key in data: @@ -911,6 +914,14 @@ class SoftwareUpdatePlugin( if update_pip_check_config: self._invalidate_version_cache("pip") + # ~~ credentials + + if "credentials" in data: + credentials = data["credentials"] + for key in defaults["credentials"]: + if key in credentials: + self._settings.set(["credentials", key], credentials[key]) + def get_settings_version(self): return 9 diff --git a/src/octoprint/static/js/lib/jquery/jquery.bootstrap.wizard.js b/src/octoprint/static/js/lib/jquery/jquery.bootstrap.wizard.js index fc9396fc5..93717ca49 100644 --- a/src/octoprint/static/js/lib/jquery/jquery.bootstrap.wizard.js +++ b/src/octoprint/static/js/lib/jquery/jquery.bootstrap.wizard.js @@ -270,7 +270,7 @@ var bootstrapWizardCreate = function(element, options) { // remove the existing handlers $('a[data-toggle="tab"]', $navigation).off('click', innerTabClick); - $('a[data-toggle="tab"]', $navigation).off('show show.bs.tab', innerTabShown); + $('a[data-toggle="tab"]', $navigation).off('show', innerTabShown); // reset elements based on current state of the DOM $navigation = element.find('ul:first', element); @@ -278,7 +278,7 @@ var bootstrapWizardCreate = function(element, options) { // re-add handlers $('a[data-toggle="tab"]', $navigation).on('click', innerTabClick); - $('a[data-toggle="tab"]', $navigation).on('show show.bs.tab', innerTabShown); + $('a[data-toggle="tab"]', $navigation).on('show', innerTabShown); obj.fixNavigationButtons(); }; @@ -303,7 +303,8 @@ var bootstrapWizardCreate = function(element, options) { $('a[data-toggle="tab"]', $navigation).on('click', innerTabClick); // attach to both show and show.bs.tab to support Bootstrap versions 2.3.2 and 3.0.0 - $('a[data-toggle="tab"]', $navigation).on('show show.bs.tab', innerTabShown); + // Note: removing show.bs.tab in the listener stops to trigger twice the method innerTabShown + $('a[data-toggle="tab"]', $navigation).on('show', innerTabShown); }; $.fn.bootstrapWizard = function(options) { //expose methods