From 3c58b913c25e90e1b7456eb4e62b02eacf440c59 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Fri, 8 Nov 2024 13:07:36 +0100 Subject: [PATCH] Add the file after the upload button, as it is in the template --- .../Core/Form/Builder/Field/Controller/FileProcessor.ts | 2 +- .../Core/Form/Builder/Field/Controller/FileProcessor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts index fef5939cb0..0a55ad8202 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -199,7 +199,7 @@ export class FileProcessor { if (container === null) { container = document.createElement("div"); container.classList.add("fileUpload__preview"); - this.#uploadButton.insertAdjacentElement("beforebegin", container); + this.#uploadButton.insertAdjacentElement("afterbegin", container); } container.append(element); } else { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js index 2a6816322b..c08dbf919a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js @@ -152,7 +152,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui if (container === null) { container = document.createElement("div"); container.classList.add("fileUpload__preview"); - this.#uploadButton.insertAdjacentElement("beforebegin", container); + this.#uploadButton.insertAdjacentElement("afterbegin", container); } container.append(element); } -- 2.20.1