+
+
+
`,
+ );
+
+ await waitFor("[data-test-show-question-usage-modal-link]");
+ await click("[data-test-show-question-usage-modal-link]");
+
+ assert.dom("[data-test-question-usage-modal]").isVisible();
+ assert.dom("[data-test-question-form-item]").exists({ count: 3 });
+ });
+
+ test("it is hidden when no other reference to this question exists", async function (assert) {
+ this.set(
+ "question",
+ this.server.create("question", {
+ label: "Test Label",
+ slug: "test-slug",
+ type: "TEXT",
+ }),
+ );
+
+ this.server.create("form", { questions: [this.question] });
+
+ await render(
+ hbs``,
+ );
+
+ assert.dom("[data-test-show-question-usage-modal-link]").isNotVisible();
+ });
+ },
+);
diff --git a/packages/form-builder/translations/de.yaml b/packages/form-builder/translations/de.yaml
index 27fab506c..11456f0dd 100644
--- a/packages/form-builder/translations/de.yaml
+++ b/packages/form-builder/translations/de.yaml
@@ -134,6 +134,11 @@ caluma:
hideLabel: "Label verstecken"
+ usage:
+ title: "Diese Frage wird in {n,plural, =1 {einem Formular} other {# Formularen}} verwendet."
+ references-heading: "Alle Verweise auf diese Frage"
+ not-published: "nicht publiziert"
+
options:
delete: "Option löschen"
archive: "Option archivieren (verstecken)"
diff --git a/packages/form-builder/translations/en.yaml b/packages/form-builder/translations/en.yaml
index c589ad23a..802220bc1 100644
--- a/packages/form-builder/translations/en.yaml
+++ b/packages/form-builder/translations/en.yaml
@@ -134,6 +134,11 @@ caluma:
hideLabel: "Hide label"
+ usage:
+ title: "This question is used in {n,plural, =1 {another form} other {# other forms}}"
+ references-heading: "All references of this question"
+ not-published: "not published"
+
options:
delete: "Delete option"
archive: "Archive (hide) option"
diff --git a/packages/form-builder/translations/fr.yaml b/packages/form-builder/translations/fr.yaml
index 81fa3630f..4376e4288 100644
--- a/packages/form-builder/translations/fr.yaml
+++ b/packages/form-builder/translations/fr.yaml
@@ -134,6 +134,11 @@ caluma:
hideLabel: "Cacher l'étiquette"
+ usage:
+ title: "Cette question est {n,plural, =1 {utilisé sous une forme} other {utilisé sous # formes}}."
+ references-heading: "Toutes les références à cette question"
+ not-published: "non publié"
+
options:
delete: "Supprimer l'option"
archive: "Archiver (masquer) l'option"