Fix selector for instruction edit and delete button in DevTools
authorMatthias Schmidt <gravatronics@live.com>
Mon, 26 Apr 2021 14:08:25 +0000 (16:08 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 26 Apr 2021 14:12:58 +0000 (16:12 +0200)
ts/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.js

index eafe90534937f3f4f7d2daad292592e424132797..2c4f36975ea3831be7aafd96b4cbf9be2227e5f0 100644 (file)
@@ -220,10 +220,10 @@ class Instructions {
     instructionList.appendChild(listItem);
 
     document
-      .getElementById(`${this.formFieldId}_instruction${instructionsId}_deleteButton`)!
+      .getElementById(`${this.formFieldId}_instruction${instructionId}_deleteButton`)!
       .addEventListener("click", (ev) => this.removeInstruction(ev));
     document
-      .getElementById(`${this.formFieldId}_instruction${instructionsId}_editButton`)!
+      .getElementById(`${this.formFieldId}_instruction${instructionId}_editButton`)!
       .addEventListener("click", (ev) => this.editInstruction(ev));
   }
 
index 85cafa54539fb3fe66ff75b21f7dea102ff18c67..044d0af3172e2249bad5b5b088a36c247a74d104 100644 (file)
@@ -129,10 +129,10 @@ define(["require", "exports", "tslib", "../../../../../../Core", "../../../../..
             listItem.innerHTML = content;
             instructionList.appendChild(listItem);
             document
-                .getElementById(`${this.formFieldId}_instruction${instructionsId}_deleteButton`)
+                .getElementById(`${this.formFieldId}_instruction${instructionId}_deleteButton`)
                 .addEventListener("click", (ev) => this.removeInstruction(ev));
             document
-                .getElementById(`${this.formFieldId}_instruction${instructionsId}_editButton`)
+                .getElementById(`${this.formFieldId}_instruction${instructionId}_editButton`)
                 .addEventListener("click", (ev) => this.editInstruction(ev));
         }
         /**