Use this.classPrefix for class name on error message element
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 19 Jun 2024 10:44:48 +0000 (12:44 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 19 Jun 2024 10:44:48 +0000 (12:44 +0200)
register the language phrase `wcf.global.button.replace`

com.woltlab.wcf/templates/shared_fileProcessorFormField.tpl
ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js

index 1638c8244ed84d0004e19f357a04b1d120955ceb..6f2a15fab24c61bdd0891c805dba8bfc1a79cd53 100644 (file)
@@ -19,6 +19,8 @@
 {unsafe:$fileProcessorHtmlElement}
 
 <script data-relocate="true">
+       {jsphrase name='wcf.global.button.replace'}
+
        require(["WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor"], ({ FileProcessor }) => {
                new FileProcessor(
                        '{@$field->getPrefixedId()|encodeJS}',
index 3a8fc92967ec713d07c532234cffd6488d6bcd72..1e8b8f4a93d75cb9953fa64cd9cb7d96f3e7bd76 100644 (file)
@@ -85,7 +85,7 @@ export class FileProcessor {
     container.classList.add("innerError");
 
     const errorElement = document.createElement("div");
-    errorElement.classList.add("fileUpload__fileList__item__errorMessage");
+    errorElement.classList.add(this.classPrefix + "item__errorMessage");
     errorElement.textContent = errorMessage;
 
     element.append(errorElement);
index a4735e06f6ed1deaf95207f56876e02c06313708..05e83a6bf52b40bcefc0f2647e5197ab6485eb6d 100644 (file)
@@ -71,7 +71,7 @@ define(["require", "exports", "WoltLabSuite/Core/Language", "WoltLabSuite/Core/A
             }
             container.classList.add("innerError");
             const errorElement = document.createElement("div");
-            errorElement.classList.add("fileUpload__fileList__item__errorMessage");
+            errorElement.classList.add(this.classPrefix + "item__errorMessage");
             errorElement.textContent = errorMessage;
             element.append(errorElement);
         }