From 6b16712f66c1422555d7f71919f89c4a2c8e66f1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 3 Jun 2022 18:37:44 +0200 Subject: [PATCH] Broken auth dialog for package update servers See https://www.woltlab.com/community/thread/295831-fehler-beim-update-beta-3-4/ --- ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts | 5 ++++- .../js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts b/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts index 4a54673937..e706e5813f 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts @@ -187,7 +187,10 @@ class AcpUiPackageUpdateManager implements DialogCallbackObject { } if (isValid) { - const packageUpdateServerID = +this.submitButton.dataset.packageUpdateServerId!; + const dialog = document.getElementById("acpUiPackageUpdateManager")!; + const submitButton = dialog.querySelector('button[data-type="submit"]') as HTMLElement; + + const packageUpdateServerID = parseInt(submitButton.dataset.packageUpdateServerId!, 10); const saveCredentials = (document.getElementById("packageUpdateServerSaveCredentials") as HTMLInputElement) .checked; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js index abe0d4593a..c8dd6bb9dd 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js @@ -129,7 +129,9 @@ define(["require", "exports", "tslib", "../../../../Ajax", "../../../../Language Util_1.default.innerError(passwordField, false); } if (isValid) { - const packageUpdateServerID = +this.submitButton.dataset.packageUpdateServerId; + const dialog = document.getElementById("acpUiPackageUpdateManager"); + const submitButton = dialog.querySelector('button[data-type="submit"]'); + const packageUpdateServerID = parseInt(submitButton.dataset.packageUpdateServerId, 10); const saveCredentials = document.getElementById("packageUpdateServerSaveCredentials") .checked; void this.prepareUpdate({ -- 2.20.1