Add German and English survey translations

This commit is contained in:
Jürgen Mummert
2026-05-24 21:24:53 +02:00
parent 6eec9ec537
commit e204da60b6
18 changed files with 498 additions and 127 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
$GLOBALS['TL_LANG']['MOD']['survey_bundle_surveys'] = ['Surveys', 'Manage surveys, questions, conditions and anonymous answers.'];
$GLOBALS['TL_LANG']['MOD']['survey_bundle_categories'] = ['Survey categories', 'Maintain categories for surveys.'];
$GLOBALS['TL_LANG']['FMD']['survey'] = 'Surveys';
$GLOBALS['TL_LANG']['FMD']['member_survey_list'] = ['My surveys', 'Displays all surveys assigned to the member.'];
$GLOBALS['TL_LANG']['FMD']['member_survey_edit'] = ['Edit survey', 'Frontend editing area for assigned surveys.'];
$GLOBALS['TL_LANG']['FMD']['show_survey'] = ['Fill out survey', 'Public survey view accessible via the public link.'];
$GLOBALS['TL_LANG']['FMD']['survey_results'] = ['Results', 'Displays the results of a survey via the configured results link.'];
+5
View File
@@ -0,0 +1,5 @@
<?php
$GLOBALS['TL_LANG']['tl_member']['survey_legend'] = 'Survey assignment';
$GLOBALS['TL_LANG']['tl_member']['surveyCategories'] = ['Survey categories', 'These categories are automatically assigned to new and already assigned surveys of this member.'];
$GLOBALS['TL_LANG']['tl_member']['assignedSurveys'] = ['Assigned surveys', 'Choose the surveys this member is allowed to edit. The search field in the selector helps when there are many entries.'];
+6
View File
@@ -0,0 +1,6 @@
<?php
$GLOBALS['TL_LANG']['tl_module']['survey_navigation_legend'] = 'Linked pages';
$GLOBALS['TL_LANG']['tl_module']['surveyEditPage'] = ['Edit page', 'Page containing the frontend module for editing surveys.'];
$GLOBALS['TL_LANG']['tl_module']['surveyListPage'] = ['Overview page', 'Page containing the survey overview.'];
$GLOBALS['TL_LANG']['tl_module']['surveyReaderPage'] = ['Display page', 'Public page for accessing a survey via the public link.'];
+6
View File
@@ -0,0 +1,6 @@
<?php
$GLOBALS['TL_LANG']['tl_settings']['survey_settings_legend'] = 'Survey settings';
$GLOBALS['TL_LANG']['tl_settings']['surveyReaderPage'] = ['Reader page', 'This page is used globally for the public survey link.'];
$GLOBALS['TL_LANG']['tl_settings']['surveyResultsPage'] = ['Results page', 'This page is used globally to display survey results.'];
$GLOBALS['TL_LANG']['tl_settings']['surveyGotenbergUrl'] = ['Gotenberg URL', 'Base URL of the Gotenberg instance for server-side PDF export, e.g. https://gotenberg.mummert.media'];
+23
View File
@@ -0,0 +1,23 @@
<?php
$GLOBALS['TL_LANG']['tl_survey']['title'] = ['Title', 'Title of the survey.'];
$GLOBALS['TL_LANG']['tl_survey']['alias'] = ['Public link key', 'Automatically generated as a 20-character link key.'];
$GLOBALS['TL_LANG']['tl_survey']['category'] = ['Categories', 'Assigns the survey to one or more categories.'];
$GLOBALS['TL_LANG']['tl_survey']['categoryFilter'] = ['Categories', 'Filters the list by a survey category.'];
$GLOBALS['TL_LANG']['tl_survey']['categorySummary'] = ['Categories', 'Assigned categories of the survey.'];
$GLOBALS['TL_LANG']['tl_survey']['description'] = ['Description', 'Introduction for the editor and the frontend.'];
$GLOBALS['TL_LANG']['tl_survey']['title_legend'] = 'Basic data';
$GLOBALS['TL_LANG']['tl_survey']['assignment_legend'] = 'Editing members';
$GLOBALS['TL_LANG']['tl_survey']['publishing_legend'] = 'Visibility';
$GLOBALS['TL_LANG']['tl_survey']['meta_legend'] = 'Administrative data';
$GLOBALS['TL_LANG']['tl_survey']['published'] = ['Published', 'Make the survey publicly accessible.'];
$GLOBALS['TL_LANG']['tl_survey']['isLocked'] = ['Locked', 'Structure is locked because answers already exist.'];
$GLOBALS['TL_LANG']['tl_survey']['assignedMembers'] = ['Assigned members', 'Choose the members who are allowed to edit this survey.'];
$GLOBALS['TL_LANG']['tl_survey']['assignedMembersFilter'] = ['Assigned users', 'Filters the list by an assigned user.'];
$GLOBALS['TL_LANG']['tl_survey']['assignedMembersSummary'] = ['Assigned users', 'Comma-separated list of assigned users.'];
$GLOBALS['TL_LANG']['tl_survey']['copyPublicLink'] = ['Copy link', 'Copy the public link to the clipboard'];
$GLOBALS['TL_LANG']['tl_survey']['showResults'] = ['Show results', 'Display the results of this survey in the frontend'];
$GLOBALS['TL_LANG']['tl_survey']['createdBy'] = ['Created by', 'ID of the creating member.'];
$GLOBALS['TL_LANG']['tl_survey']['updatedBy'] = ['Updated by', 'ID of the member who last edited it.'];
$GLOBALS['TL_LANG']['tl_survey']['createdAt'] = ['Created on', 'Creation time.'];
$GLOBALS['TL_LANG']['tl_survey']['updatedAt'] = ['Updated on', 'Time of the last update.'];
+5
View File
@@ -0,0 +1,5 @@
<?php
$GLOBALS['TL_LANG']['tl_survey_answer']['question'] = ['Question', 'Reference to the question.'];
$GLOBALS['TL_LANG']['tl_survey_answer']['questionType'] = ['Question type', 'Stored question type at the time the answer was given.'];
$GLOBALS['TL_LANG']['tl_survey_answer']['value'] = ['Answer', 'Stored answer.'];
@@ -0,0 +1,6 @@
<?php
$GLOBALS['TL_LANG']['tl_survey_category']['title'] = ['Title', 'Title of the category.'];
$GLOBALS['TL_LANG']['tl_survey_category']['alias'] = ['Alias', 'Optional alias.'];
$GLOBALS['TL_LANG']['tl_survey_category']['title_legend'] = 'Basic data';
$GLOBALS['TL_LANG']['tl_survey_category']['sorting'] = ['Sorting', 'Sorting value for the backend list.'];
@@ -0,0 +1,6 @@
<?php
$GLOBALS['TL_LANG']['tl_survey_condition']['logic_legend'] = 'Jump rule';
$GLOBALS['TL_LANG']['tl_survey_condition']['sourceQuestion'] = ['Source question', 'Question whose answer is evaluated.'];
$GLOBALS['TL_LANG']['tl_survey_condition']['answerValue'] = ['Answer', 'Answer value that triggers a jump to another question.'];
$GLOBALS['TL_LANG']['tl_survey_condition']['targetQuestion'] = ['Next question', 'The survey continues with this question when the answer matches.'];
+32
View File
@@ -0,0 +1,32 @@
<?php
$GLOBALS['TL_LANG']['tl_survey_content']['type'] = ['Question type', 'Type of the question.'];
$GLOBALS['TL_LANG']['tl_survey_content']['types'] = [
'yes_no_maybe' => 'Yes-no question',
'text' => 'Open question',
'range' => 'Rating question',
'choice' => 'Single/multiple choice',
];
$GLOBALS['TL_LANG']['tl_survey_content']['question'] = ['Question', 'Title or wording of the question.'];
$GLOBALS['TL_LANG']['tl_survey_content']['description'] = ['Description', 'Optional additional description for the question.'];
$GLOBALS['TL_LANG']['tl_survey_content']['question_legend'] = 'Question';
$GLOBALS['TL_LANG']['tl_survey_content']['settings_legend'] = 'Settings';
$GLOBALS['TL_LANG']['tl_survey_content']['mandatory'] = ['Required question', 'This question must be answered.'];
$GLOBALS['TL_LANG']['tl_survey_content']['published'] = ['Active', 'The question is shown in the survey.'];
$GLOBALS['TL_LANG']['tl_survey_content']['allowMaybe'] = ['Offer maybe', 'Adds the Maybe answer option to the yes-no question.'];
$GLOBALS['TL_LANG']['tl_survey_content']['jumpOnYes'] = ['Jump to question on yes', 'Jumps directly to this question when the answer is Yes.'];
$GLOBALS['TL_LANG']['tl_survey_content']['jumpOnNo'] = ['Jump to question on no', 'Jumps directly to this question when the answer is No.'];
$GLOBALS['TL_LANG']['tl_survey_content']['allowMultiple'] = ['Enable multiple choice', 'Allows multiple answers instead of a single selection.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption1'] = ['Answer 1', 'First possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption2'] = ['Answer 2', 'Second possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption3'] = ['Answer 3', 'Third possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption4'] = ['Answer 4', 'Fourth possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption5'] = ['Answer 5', 'Fifth possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption6'] = ['Answer 6', 'Sixth possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption7'] = ['Answer 7', 'Seventh possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption8'] = ['Answer 8', 'Eighth possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption9'] = ['Answer 9', 'Ninth possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['answerOption10'] = ['Answer 10', 'Tenth possible answer.'];
$GLOBALS['TL_LANG']['tl_survey_content']['rangeMin'] = ['Minimum value', 'Smallest value of the slider.'];
$GLOBALS['TL_LANG']['tl_survey_content']['rangeMax'] = ['Maximum value', 'Largest value of the slider.'];
$GLOBALS['TL_LANG']['tl_survey_content']['rangeStep'] = ['Step size', 'Distance between the possible slider values.'];
+4
View File
@@ -0,0 +1,4 @@
<?php
$GLOBALS['TL_LANG']['tl_survey_editor']['editor_legend'] = 'Editing permissions';
$GLOBALS['TL_LANG']['tl_survey_editor']['member'] = ['Editing member', 'This frontend member is allowed to edit the survey.'];
@@ -0,0 +1,7 @@
<?php
$GLOBALS['TL_LANG']['tl_survey_submission']['token'] = ['Participation code', 'Anonymous code of this survey run.'];
$GLOBALS['TL_LANG']['tl_survey_submission']['startedAt'] = ['Started on', 'Time when the survey was started.'];
$GLOBALS['TL_LANG']['tl_survey_submission']['completedAt'] = ['Completed on', 'Time when the survey was completed.'];
$GLOBALS['TL_LANG']['tl_survey_submission']['currentQuestion'] = ['Current question', 'Internal identifier of the currently open question.'];
$GLOBALS['TL_LANG']['tl_survey_submission']['isFinished'] = ['Completed', 'Marks completed survey runs.'];
@@ -1,3 +1,5 @@
{% trans_default_domain 'messages' %}
{% include '@Survey/frontend/_survey_assets.html.twig' %}
{% include '@Survey/frontend/_survey_branding.html.twig' %}
@@ -11,52 +13,52 @@
{% endif %}
{% if loginRequired %}
<div class="survey-alert warning">Dieses Frontendmodul ist fuer eingeloggte Mitglieder gedacht. Nutzen Sie den normalen Contao-Mitgliederlogin auf einer geschuetzten Seite.</div>
<div class="survey-alert warning">{{ 'survey.edit.login_required'|trans }}</div>
{% elseif createMode %}
<div class="survey-card">
<h3>Neue Umfrage erstellen</h3>
<p>Die Umfrage wird nach dem Anlegen automatisch dem eingeloggten Mitglied zugewiesen.</p>
<h3>{{ 'survey.edit.create_title'|trans }}</h3>
<p>{{ 'survey.edit.create_text'|trans }}</p>
{{ form_start(surveyForm, {attr: {class: 'survey-form-grid'}}) }}
<label class="survey-label">Titel{{ form_widget(surveyForm.title) }}{{ form_errors(surveyForm.title) }}</label>
<label class="survey-label">Beschreibung{{ form_widget(surveyForm.description) }}</label>
<label class="survey-inline-check">{{ form_widget(surveyForm.published) }}<span>Direkt veroeffentlichen</span></label>
<label class="survey-label">{{ 'survey.edit.label_title'|trans }}{{ form_widget(surveyForm.title) }}{{ form_errors(surveyForm.title) }}</label>
<label class="survey-label">{{ 'survey.edit.label_description'|trans }}{{ form_widget(surveyForm.description) }}</label>
<label class="survey-inline-check">{{ form_widget(surveyForm.published) }}<span>{{ 'survey.edit.publish_directly'|trans }}</span></label>
<div class="survey-button-row">
<button class="survey-button primary">Umfrage erstellen</button>
{% if backUrl %}<a class="survey-button secondary" href="{{ backUrl }}">Zur Liste</a>{% endif %}
<button class="survey-button primary">{{ 'survey.edit.create_submit'|trans }}</button>
{% if backUrl %}<a class="survey-button secondary" href="{{ backUrl }}">{{ 'survey.edit.back_to_list'|trans }}</a>{% endif %}
</div>
{{ form_end(surveyForm) }}
</div>
{% else %}
{% set locked = survey.isLocked == '1' %}
<div class="survey-button-row">
{% if backUrl %}<a class="survey-button secondary" href="{{ backUrl }}">Zur Liste</a>{% endif %}
{% if publicUrl %}<a class="survey-button primary" href="{{ publicUrl }}" target="_blank" rel="noreferrer">Oeffentliche Ansicht oeffnen</a>{% endif %}
{% if backUrl %}<a class="survey-button secondary" href="{{ backUrl }}">{{ 'survey.edit.back_to_list'|trans }}</a>{% endif %}
{% if publicUrl %}<a class="survey-button primary" href="{{ publicUrl }}" target="_blank" rel="noreferrer">{{ 'survey.edit.public_view_open'|trans }}</a>{% endif %}
</div>
<div class="survey-kpis">
<article class="survey-card"><strong>Oeffentlicher Link</strong><div>{% if publicUrl %}<a href="{{ publicUrl }}" target="_blank" rel="noreferrer">{{ publicUrl }}</a>{% else %}Noch keine oeffentliche Seite hinterlegt.{% endif %}</div></article>
<article class="survey-card"><strong>Status</strong><div class="survey-meta"><span class="survey-badge {{ survey.published ? 'success' : 'neutral' }}">{{ survey.published ? 'veroeffentlicht' : 'entwurf' }}</span>{% if locked %}<span class="survey-badge warning">gesperrt</span>{% endif %}</div></article>
<article class="survey-card"><strong>Bearbeitende</strong><div>{{ editors|length }} Mitglied(er)</div></article>
<article class="survey-card"><strong>{{ 'survey.edit.public_link'|trans }}</strong><div>{% if publicUrl %}<a href="{{ publicUrl }}" target="_blank" rel="noreferrer">{{ publicUrl }}</a>{% else %}{{ 'survey.edit.no_public_page'|trans }}{% endif %}</div></article>
<article class="survey-card"><strong>{{ 'survey.edit.status'|trans }}</strong><div class="survey-meta"><span class="survey-badge {{ survey.published ? 'success' : 'neutral' }}">{{ survey.published ? 'survey.edit.published'|trans : 'survey.edit.draft'|trans }}</span>{% if locked %}<span class="survey-badge warning">{{ 'survey.edit.locked'|trans }}</span>{% endif %}</div></article>
<article class="survey-card"><strong>{{ 'survey.edit.editors'|trans }}</strong><div>{{ 'survey.edit.editors_count'|trans({'%count%': editors|length}) }}</div></article>
</div>
{% if locked %}
<div class="survey-alert warning">Die Umfrage ist strukturell gesperrt, weil bereits Antworten vorliegen. Stammdaten koennen weiter gepflegt werden, der Ablauf und die Fragen jedoch nicht.</div>
<div class="survey-alert warning">{{ 'survey.edit.structure_locked'|trans }}</div>
{% endif %}
<div class="survey-grid-columns">
<div class="survey-grid">
<div class="survey-card">
<h3>Umfrage-Metadaten</h3>
<h3>{{ 'survey.edit.metadata'|trans }}</h3>
{{ form_start(surveyForm, {attr: {class: 'survey-form-grid'}}) }}
<label class="survey-label">Titel{{ form_widget(surveyForm.title) }}{{ form_errors(surveyForm.title) }}</label>
<label class="survey-label">Beschreibung{{ form_widget(surveyForm.description) }}</label>
<label class="survey-inline-check">{{ form_widget(surveyForm.published) }}<span>Umfrage veroeffentlichen</span></label>
<div class="survey-button-row"><button class="survey-button primary">Speichern</button></div>
<label class="survey-label">{{ 'survey.edit.label_title'|trans }}{{ form_widget(surveyForm.title) }}{{ form_errors(surveyForm.title) }}</label>
<label class="survey-label">{{ 'survey.edit.label_description'|trans }}{{ form_widget(surveyForm.description) }}</label>
<label class="survey-inline-check">{{ form_widget(surveyForm.published) }}<span>{{ 'survey.edit.publish_survey'|trans }}</span></label>
<div class="survey-button-row"><button class="survey-button primary">{{ 'survey.edit.save'|trans }}</button></div>
{{ form_end(surveyForm) }}
</div>
<div class="survey-card">
<h3>Bearbeitende Mitglieder</h3>
<h3>{{ 'survey.edit.editors_title'|trans }}</h3>
<div class="survey-grid">
{% for editor in editors %}
<div>
@@ -64,26 +66,26 @@
<span>{{ editor.email|striptags|trim }}</span>
</div>
{% else %}
<div>Keine Editoren hinterlegt.</div>
<div>{{ 'survey.edit.no_editors'|trans }}</div>
{% endfor %}
</div>
</div>
<div class="survey-card">
<h3>Antworten und Ergebnisse</h3>
<h3>{{ 'survey.edit.responses_title'|trans }}</h3>
<div class="survey-grid">
{% for submission in submissions %}
<article>
<div class="survey-meta">
<span class="survey-badge neutral">{{ submission.answerCount }} Antworten</span>
<span class="survey-badge {{ submission.isFinished ? 'success' : 'warning' }}">{{ submission.isFinished ? 'abgeschlossen' : 'offen' }}</span>
<span class="survey-badge neutral">{{ 'survey.list.answers'|trans({'%count%': submission.answerCount}) }}</span>
<span class="survey-badge {{ submission.isFinished ? 'success' : 'warning' }}">{{ submission.isFinished ? 'survey.edit.completed'|trans : 'survey.edit.open'|trans }}</span>
</div>
<div>Begonnen: {{ submission.startedAt ? submission.startedAt|date('d.m.Y H:i') : 'unbekannt' }}</div>
<div>Beendet: {{ submission.completedAt ? submission.completedAt|date('d.m.Y H:i') : 'unbekannt' }}</div>
<div>Teilnahme-Code: {{ submission.token }}</div>
<div>{{ 'survey.edit.started_at'|trans }}: {{ submission.startedAt ? submission.startedAt|date('d.m.Y H:i') : 'survey.edit.unknown'|trans }}</div>
<div>{{ 'survey.edit.completed_at'|trans }}: {{ submission.completedAt ? submission.completedAt|date('d.m.Y H:i') : 'survey.edit.unknown'|trans }}</div>
<div>{{ 'survey.edit.participation_code'|trans }}: {{ submission.token }}</div>
</article>
{% else %}
<div>Es liegen noch keine Teilnahmen vor.</div>
<div>{{ 'survey.edit.no_submissions'|trans }}</div>
{% endfor %}
</div>
</div>
@@ -91,39 +93,39 @@
<div class="survey-grid">
<div class="survey-card" data-survey-question-editor>
<div class="survey-meta"><h3>Fragen bearbeiten</h3>{% if activeQuestionId %}<span class="survey-badge neutral">Bearbeitungsmodus</span>{% endif %}</div>
<div class="survey-meta"><h3>{{ 'survey.edit.questions_title'|trans }}</h3>{% if activeQuestionId %}<span class="survey-badge neutral">{{ 'survey.edit.edit_mode'|trans }}</span>{% endif %}</div>
{% if not locked %}
{% set questionType = questionForm.type.vars.value ?: 'yes_no_maybe' %}
{{ form_start(questionForm, {attr: {class: 'survey-form-grid'}}) }}
<label class="survey-label">Fragetyp{{ form_widget(questionForm.type, {attr: {'data-survey-question-type': '1'}}) }}</label>
<label class="survey-label">Frage{{ form_widget(questionForm.question) }}{{ form_errors(questionForm.question) }}</label>
<label class="survey-label">Beschreibung{{ form_widget(questionForm.description) }}</label>
<label class="survey-inline-check">{{ form_widget(questionForm.mandatory) }}<span>Pflichtfrage</span></label>
<label class="survey-inline-check">{{ form_widget(questionForm.published) }}<span>Aktiv</span></label>
<label class="survey-inline-check yes-no-config-field"{% if questionType != 'yes_no_maybe' %} style="display:none"{% endif %}>{{ form_widget(questionForm.allowMaybe) }}<span>Vielleicht anbieten</span></label>
<label class="survey-label">{{ 'survey.edit.label_type'|trans }}{{ form_widget(questionForm.type, {attr: {'data-survey-question-type': '1'}}) }}</label>
<label class="survey-label">{{ 'survey.edit.label_question'|trans }}{{ form_widget(questionForm.question) }}{{ form_errors(questionForm.question) }}</label>
<label class="survey-label">{{ 'survey.edit.label_description'|trans }}{{ form_widget(questionForm.description) }}</label>
<label class="survey-inline-check">{{ form_widget(questionForm.mandatory) }}<span>{{ 'survey.edit.mandatory'|trans }}</span></label>
<label class="survey-inline-check">{{ form_widget(questionForm.published) }}<span>{{ 'survey.edit.active'|trans }}</span></label>
<label class="survey-inline-check yes-no-config-field"{% if questionType != 'yes_no_maybe' %} style="display:none"{% endif %}>{{ form_widget(questionForm.allowMaybe) }}<span>{{ 'survey.edit.allow_maybe'|trans }}</span></label>
<div class="yes-no-config-field survey-grid-columns"{% if questionType != 'yes_no_maybe' %} style="display:none;grid-template-columns: repeat(2, minmax(0, 1fr));"{% else %} style="grid-template-columns: repeat(2, minmax(0, 1fr));"{% endif %}>
<label class="survey-label">Zur Frage springen bei Auswahl ja{{ form_widget(questionForm.jumpOnYes) }}</label>
<label class="survey-label">Zur Frage springen bei Auswahl nein{{ form_widget(questionForm.jumpOnNo) }}</label>
<label class="survey-label">{{ 'survey.edit.jump_yes'|trans }}{{ form_widget(questionForm.jumpOnYes) }}</label>
<label class="survey-label">{{ 'survey.edit.jump_no'|trans }}{{ form_widget(questionForm.jumpOnNo) }}</label>
</div>
<label class="survey-inline-check choice-config-field"{% if questionType != 'choice' %} style="display:none"{% endif %}>{{ form_widget(questionForm.allowMultiple) }}<span>Multiple-Choice aktivieren</span></label>
<label class="survey-inline-check choice-config-field"{% if questionType != 'choice' %} style="display:none"{% endif %}>{{ form_widget(questionForm.allowMultiple) }}<span>{{ 'survey.edit.allow_multiple'|trans }}</span></label>
<div class="choice-config-field survey-grid-columns"{% if questionType != 'choice' %} style="display:none;grid-template-columns: repeat(2, minmax(0, 1fr));"{% else %} style="grid-template-columns: repeat(2, minmax(0, 1fr));"{% endif %}>
<label class="survey-label">Antwort 1{{ form_widget(questionForm.answerOption1) }}</label>
<label class="survey-label">Antwort 2{{ form_widget(questionForm.answerOption2) }}</label>
<label class="survey-label">Antwort 3{{ form_widget(questionForm.answerOption3) }}</label>
<label class="survey-label">Antwort 4{{ form_widget(questionForm.answerOption4) }}</label>
<label class="survey-label">Antwort 5{{ form_widget(questionForm.answerOption5) }}</label>
<label class="survey-label">Antwort 6{{ form_widget(questionForm.answerOption6) }}</label>
<label class="survey-label">Antwort 7{{ form_widget(questionForm.answerOption7) }}</label>
<label class="survey-label">Antwort 8{{ form_widget(questionForm.answerOption8) }}</label>
<label class="survey-label">Antwort 9{{ form_widget(questionForm.answerOption9) }}</label>
<label class="survey-label">Antwort 10{{ form_widget(questionForm.answerOption10) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 1}) }}{{ form_widget(questionForm.answerOption1) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 2}) }}{{ form_widget(questionForm.answerOption2) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 3}) }}{{ form_widget(questionForm.answerOption3) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 4}) }}{{ form_widget(questionForm.answerOption4) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 5}) }}{{ form_widget(questionForm.answerOption5) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 6}) }}{{ form_widget(questionForm.answerOption6) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 7}) }}{{ form_widget(questionForm.answerOption7) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 8}) }}{{ form_widget(questionForm.answerOption8) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 9}) }}{{ form_widget(questionForm.answerOption9) }}</label>
<label class="survey-label">{{ 'survey.edit.answer_option'|trans({'%number%': 10}) }}{{ form_widget(questionForm.answerOption10) }}</label>
</div>
<div class="range-config-field survey-grid-columns"{% if questionType != 'range' %} style="display:none;grid-template-columns: repeat(3, minmax(0, 1fr));"{% else %} style="grid-template-columns: repeat(3, minmax(0, 1fr));"{% endif %}>
<label class="survey-label">Kleinster Wert{{ form_widget(questionForm.rangeMin) }}</label>
<label class="survey-label">Groesster Wert{{ form_widget(questionForm.rangeMax) }}</label>
<label class="survey-label">Schrittweite{{ form_widget(questionForm.rangeStep) }}</label>
<label class="survey-label">{{ 'survey.edit.range_min'|trans }}{{ form_widget(questionForm.rangeMin) }}</label>
<label class="survey-label">{{ 'survey.edit.range_max'|trans }}{{ form_widget(questionForm.rangeMax) }}</label>
<label class="survey-label">{{ 'survey.edit.range_step'|trans }}{{ form_widget(questionForm.rangeStep) }}</label>
</div>
<div class="survey-button-row"><button class="survey-button primary">{{ activeQuestionId ? 'Frage aktualisieren' : 'Frage speichern' }}</button></div>
<div class="survey-button-row"><button class="survey-button primary">{{ activeQuestionId ? 'survey.edit.update_question'|trans : 'survey.edit.save_question'|trans }}</button></div>
{{ form_end(questionForm) }}
{% endif %}
@@ -132,60 +134,60 @@
<article class="survey-card">
<div class="survey-meta">
<span class="survey-badge neutral">{{ question.type }}</span>
{% if question.mandatory %}<span class="survey-badge warning">Pflicht</span>{% endif %}
{% if loop.first %}<span class="survey-badge success">Start</span>{% endif %}
{% if question.mandatory %}<span class="survey-badge warning">{{ 'survey.edit.mandatory_badge'|trans }}</span>{% endif %}
{% if loop.first %}<span class="survey-badge success">{{ 'survey.edit.start_badge'|trans }}</span>{% endif %}
</div>
<h4>{{ question.question|striptags|trim }}</h4>
<p>{{ (question.description|striptags|trim) ?: 'Keine Zusatzbeschreibung.' }}</p>
<p>{{ (question.description|striptags|trim) ?: 'survey.edit.no_extra_description'|trans }}</p>
{% if not locked %}
<div class="survey-button-row">
<a class="survey-button secondary" href="?survey={{ survey.id }}&question={{ question.id }}">Bearbeiten</a>
<a class="survey-button secondary" href="?survey={{ survey.id }}&question={{ question.id }}">{{ 'survey.list.edit'|trans }}</a>
<form method="post">
<input type="hidden" name="_survey_action" value="delete-question">
<input type="hidden" name="item_id" value="{{ question.id }}">
<input type="hidden" name="_token" value="{{ csrf_token('delete-question-' ~ question.id) }}">
<button class="survey-button danger" onclick="return confirm('Frage wirklich loeschen?');">Loeschen</button>
<button class="survey-button danger" onclick="return confirm('{{ 'survey.edit.delete_question_confirm'|trans|e('js') }}');">{{ 'survey.edit.delete'|trans }}</button>
</form>
</div>
{% endif %}
</article>
{% else %}
<div>Noch keine Fragen angelegt.</div>
<div>{{ 'survey.edit.no_questions'|trans }}</div>
{% endfor %}
</div>
</div>
<div class="survey-card">
<div class="survey-meta"><h3>Sprungregeln</h3>{% if activeConditionId %}<span class="survey-badge neutral">Bearbeitungsmodus</span>{% endif %}</div>
<div class="survey-meta"><h3>{{ 'survey.edit.conditions_title'|trans }}</h3>{% if activeConditionId %}<span class="survey-badge neutral">{{ 'survey.edit.edit_mode'|trans }}</span>{% endif %}</div>
{% if not locked %}
{{ form_start(conditionForm, {attr: {class: 'survey-form-grid'}}) }}
<label class="survey-label">Ausgangsfrage{{ form_widget(conditionForm.sourceQuestion) }}</label>
<label class="survey-label">Antwort{{ form_widget(conditionForm.answerValue) }}</label>
<label class="survey-label">Naechste Frage{{ form_widget(conditionForm.targetQuestion) }}</label>
<div class="survey-button-row"><button class="survey-button primary">{{ activeConditionId ? 'Bedingung aktualisieren' : 'Bedingung speichern' }}</button></div>
<label class="survey-label">{{ 'survey.edit.source_question'|trans }}{{ form_widget(conditionForm.sourceQuestion) }}</label>
<label class="survey-label">{{ 'survey.edit.answer'|trans }}{{ form_widget(conditionForm.answerValue) }}</label>
<label class="survey-label">{{ 'survey.edit.next_question'|trans }}{{ form_widget(conditionForm.targetQuestion) }}</label>
<div class="survey-button-row"><button class="survey-button primary">{{ activeConditionId ? 'survey.edit.update_condition'|trans : 'survey.edit.save_condition'|trans }}</button></div>
{{ form_end(conditionForm) }}
{% endif %}
<div class="survey-grid">
{% for condition in conditions %}
<article class="survey-card">
<div><strong>Wenn Antwort = {{ condition.answerValue|striptags|trim }}</strong></div>
<div>{{ (condition.sourceQuestionLabel|striptags|trim) ?: ('Frage #' ~ condition.sourceQuestion) }}</div>
<div>weiter zu {{ (condition.targetQuestionLabel|striptags|trim) ?: ('Frage #' ~ condition.targetQuestion) }}</div>
<div><strong>{{ 'survey.edit.condition_prefix'|trans({'%value%': condition.answerValue|striptags|trim}) }}</strong></div>
<div>{{ (condition.sourceQuestionLabel|striptags|trim) ?: 'survey.edit.question_fallback'|trans({'%id%': condition.sourceQuestion}) }}</div>
<div>{{ 'survey.edit.continue_to'|trans({'%target%': ((condition.targetQuestionLabel|striptags|trim) ?: ('survey.edit.question_fallback'|trans({'%id%': condition.targetQuestion})))}) }}</div>
{% if not locked %}
<div class="survey-button-row">
<a class="survey-button secondary" href="?survey={{ survey.id }}&condition={{ condition.id }}">Bearbeiten</a>
<a class="survey-button secondary" href="?survey={{ survey.id }}&condition={{ condition.id }}">{{ 'survey.edit.edit_condition'|trans }}</a>
<form method="post">
<input type="hidden" name="_survey_action" value="delete-condition">
<input type="hidden" name="item_id" value="{{ condition.id }}">
<input type="hidden" name="_token" value="{{ csrf_token('delete-condition-' ~ condition.id) }}">
<button class="survey-button danger" onclick="return confirm('Bedingung wirklich loeschen?');">Loeschen</button>
<button class="survey-button danger" onclick="return confirm('{{ 'survey.edit.delete_condition_confirm'|trans|e('js') }}');">{{ 'survey.edit.delete'|trans }}</button>
</form>
</div>
{% endif %}
</article>
{% else %}
<div>Noch keine Bedingungen definiert.</div>
<div>{{ 'survey.edit.no_conditions'|trans }}</div>
{% endfor %}
</div>
</div>
@@ -1,3 +1,5 @@
{% trans_default_domain 'messages' %}
{% include '@Survey/frontend/_survey_assets.html.twig' %}
{% include '@Survey/frontend/_survey_branding.html.twig' %}
@@ -11,11 +13,11 @@
{% endif %}
{% if loginRequired %}
<div class="survey-alert warning">Dieser Bereich verwendet den normalen Contao-Mitgliederlogin. Bitte binden Sie das Modul auf einer geschuetzten Seite oder mit einer separaten Login-Seite ein.</div>
<div class="survey-alert warning">{{ 'survey.list.login_required'|trans }}</div>
{% else %}
<div class="survey-button-row">
{% if createUrl %}
<a class="survey-button primary" href="{{ createUrl }}">Neue Umfrage anlegen</a>
<a class="survey-button primary" href="{{ createUrl }}">{{ 'survey.list.create'|trans }}</a>
{% endif %}
</div>
@@ -24,30 +26,30 @@
<article class="survey-card">
<div class="survey-meta">
<h3>{{ survey.title|striptags|trim }}</h3>
<span class="survey-badge {{ survey.published ? 'success' : 'neutral' }}">{{ survey.published ? 'veroeffentlicht' : 'Entwurf' }}</span>
<span class="survey-badge {{ survey.published ? 'success' : 'neutral' }}">{{ survey.published ? 'survey.list.published'|trans : 'survey.list.draft'|trans }}</span>
{% if survey.isLocked %}
<span class="survey-badge warning">gesperrt</span>
<span class="survey-badge warning">{{ 'survey.list.locked'|trans }}</span>
{% endif %}
</div>
<p>{{ (survey.description|striptags|trim) ?: 'Keine Beschreibung hinterlegt.' }}</p>
<p>{{ (survey.description|striptags|trim) ?: 'survey.list.no_description'|trans }}</p>
<div class="survey-meta">
<span class="survey-badge neutral">{{ survey.questionCount }} Fragen</span>
<span class="survey-badge neutral">{{ survey.answerCount }} Antworten</span>
<span class="survey-badge neutral">{{ 'survey.list.questions'|trans({'%count%': survey.questionCount}) }}</span>
<span class="survey-badge neutral">{{ 'survey.list.answers'|trans({'%count%': survey.answerCount}) }}</span>
</div>
<div class="survey-button-row">
{% if survey.editUrl %}
<a class="survey-button primary" href="{{ survey.editUrl }}">Bearbeiten</a>
<a class="survey-button primary" href="{{ survey.editUrl }}">{{ 'survey.list.edit'|trans }}</a>
{% endif %}
{% if survey.publicUrl %}
<a class="survey-button secondary" href="{{ survey.publicUrl }}" target="_blank" rel="noreferrer">Oeffentliche Ansicht</a>
<a class="survey-button secondary" href="{{ survey.publicUrl }}" target="_blank" rel="noreferrer">{{ 'survey.list.public_view'|trans }}</a>
{% endif %}
{% if survey.resultsUrl %}
<a class="survey-button secondary" href="{{ survey.resultsUrl }}" target="_blank" rel="noreferrer">Ergebnisse anzeigen</a>
<a class="survey-button secondary" href="{{ survey.resultsUrl }}" target="_blank" rel="noreferrer">{{ 'survey.list.show_results'|trans }}</a>
{% endif %}
</div>
</article>
{% else %}
<div class="survey-card">Dem eingeloggten Mitglied ist aktuell keine Umfrage zugewiesen.</div>
<div class="survey-card">{{ 'survey.list.empty'|trans }}</div>
{% endfor %}
</div>
{% endif %}
@@ -1,3 +1,5 @@
{% trans_default_domain 'messages' %}
{% include '@Survey/frontend/_survey_assets.html.twig' %}
{% include '@Survey/frontend/_survey_branding.html.twig' %}
@@ -16,7 +18,7 @@
<h3>{{ survey.title|striptags|trim }}</h3>
{% if progress.total > 0 %}<span class="survey-badge neutral">{{ progress.current }}/{{ progress.total }}</span>{% endif %}
</div>
<p>{{ (survey.description|striptags|trim) ?: 'Bitte beantworten Sie die folgenden Fragen. Jede Frage wird einzeln angezeigt.' }}</p>
<p>{{ (survey.description|striptags|trim) ?: 'survey.survey.default_description'|trans }}</p>
{% if progress.total > 0 %}
<div class="survey-progress"><span style="width: {{ progress.percentage }}%"></span></div>
@@ -25,8 +27,8 @@
{% if isComplete %}
<article class="survey-card">
<h3>Vielen Dank fuers Ausfuellen.</h3>
<p>Ihre Antworten wurden anonym gespeichert. Es wurde keine Teilnehmeridentitaet mit diesem Umfrage-Durchlauf verknuepft.</p>
<h3>{{ 'survey.survey.thanks_title'|trans }}</h3>
<p>{{ 'survey.survey.thanks_text'|trans }}</p>
{% if answers %}
<div class="survey-grid">
{% for answer in answers %}
@@ -41,7 +43,7 @@
</article>
{% elseif question %}
<article class="survey-card">
<div class="survey-meta"><span class="survey-badge neutral">Frage {{ progress.current }}</span></div>
<div class="survey-meta"><span class="survey-badge neutral">{{ 'survey.survey.question_progress'|trans({'%current%': progress.current}) }}</span></div>
<h3>{{ question.question|striptags|trim }}</h3>
{% if question.description|striptags|trim %}<p>{{ question.description|striptags|trim }}</p>{% endif %}
@@ -52,7 +54,7 @@
{% for child in surveyForm.answer %}
<label class="survey-card" style="cursor: pointer;">
<div class="survey-meta"><strong>{{ child.vars.label|striptags|trim }}</strong>{{ form_widget(child) }}</div>
<div>Diese Antwort wird direkt fuer den weiteren Ablauf verwendet.</div>
<div>{{ 'survey.survey.answer_flow_hint'|trans }}</div>
</label>
{% endfor %}
</div>
@@ -67,7 +69,7 @@
{% elseif question.type == 'range' %}
<div class="survey-grid">
<div class="survey-card">
<div>Aktueller Wert</div>
<div>{{ 'survey.survey.current_value'|trans }}</div>
<div id="survey-range-output-{{ question.id }}" class="survey-range-output">{{ question.rangeMin }}</div>
</div>
{{ form_widget(surveyForm.answer, {attr: {'data-survey-range': '1', 'data-survey-range-target': 'survey-range-output-' ~ question.id}}) }}
@@ -78,7 +80,7 @@
{% endif %}
{{ form_errors(surveyForm.answer) }}
<div class="survey-button-row"><button class="survey-button primary">Weiter</button></div>
<div class="survey-button-row"><button class="survey-button primary">{{ 'survey.survey.next'|trans }}</button></div>
{{ form_end(surveyForm) }}
</article>
{% endif %}
@@ -1,3 +1,5 @@
{% trans_default_domain 'messages' %}
{% include '@Survey/frontend/_survey_assets.html.twig' %}
{% include '@Survey/frontend/_survey_branding.html.twig' %}
@@ -16,19 +18,19 @@
<article class="survey-card">
<div class="survey-meta">
<h2>{{ survey.title|striptags|trim }}</h2>
<span class="survey-badge neutral">{{ completedSubmissionCount }} abgeschlossene Teilnahmen</span>
<span class="survey-badge neutral">{{ questionResults|length }} Fragen</span>
<span class="survey-badge neutral">{{ 'survey.results.completed_submissions'|trans({'%count%': completedSubmissionCount}) }}</span>
<span class="survey-badge neutral">{{ 'survey.results.questions'|trans({'%count%': questionResults|length}) }}</span>
</div>
<p>{{ (survey.description|striptags|trim) ?: 'Keine Beschreibung hinterlegt.' }}</p>
<p>{{ (survey.description|striptags|trim) ?: 'survey.results.no_description'|trans }}</p>
{% if downloadUrl or pdfDownloadUrl %}
<div class="survey-button-row">
{% if downloadUrl %}
<a class="survey-button primary" href="{{ downloadUrl }}">Ergebnisse als Excel herunterladen</a>
<a class="survey-button primary" href="{{ downloadUrl }}">{{ 'survey.results.download_excel'|trans }}</a>
{% endif %}
{% if pdfDownloadUrl %}
<a class="survey-button secondary" href="{{ pdfDownloadUrl }}">Ergebnisse als PDF herunterladen</a>
<a class="survey-button secondary" href="{{ pdfDownloadUrl }}">{{ 'survey.results.download_pdf'|trans }}</a>
{% endif %}
</div>
{% endif %}
@@ -39,8 +41,8 @@
<article class="survey-card survey-results-card">
<div class="survey-meta">
<h3>{{ question.question|striptags|trim }}</h3>
<span class="survey-badge neutral">{{ question.totalAnswers }} Antworten</span>
<span class="survey-badge neutral">{{ question.responseRate }}% Ruecklauf</span>
<span class="survey-badge neutral">{{ 'survey.results.answers'|trans({'%count%': question.totalAnswers}) }}</span>
<span class="survey-badge neutral">{{ 'survey.results.response_rate'|trans({'%rate%': question.responseRate}) }}</span>
</div>
{% if question.description|striptags|trim %}
@@ -75,15 +77,15 @@
{% elseif question.type == 'range' %}
<div class="survey-metric-grid">
<div class="survey-metric-card">
<span class="survey-metric-label">Minimum</span>
<span class="survey-metric-label">{{ 'survey.results.minimum'|trans }}</span>
<strong>{{ question.minimum is not null ? question.minimum : '-' }}</strong>
</div>
<div class="survey-metric-card">
<span class="survey-metric-label">Maximum</span>
<span class="survey-metric-label">{{ 'survey.results.maximum'|trans }}</span>
<strong>{{ question.maximum is not null ? question.maximum : '-' }}</strong>
</div>
<div class="survey-metric-card">
<span class="survey-metric-label">Durchschnitt</span>
<span class="survey-metric-label">{{ 'survey.results.average'|trans }}</span>
<strong>{{ question.average is not null ? question.average : '-' }}</strong>
</div>
</div>
@@ -101,7 +103,7 @@
</div>
</div>
{% else %}
<p>Noch keine Bewertungen vorhanden.</p>
<p>{{ 'survey.results.no_ratings'|trans }}</p>
{% endfor %}
</div>
{% else %}
@@ -126,7 +128,7 @@
{% for response in question.responses %}
<blockquote class="survey-card survey-response-card">{{ response|striptags|trim|nl2br }}</blockquote>
{% else %}
<p>Noch keine Freitextantworten vorhanden.</p>
<p>{{ 'survey.results.no_text_responses'|trans }}</p>
{% endfor %}
</div>
{% endif %}
@@ -134,7 +136,7 @@
</div>
</article>
{% else %}
<article class="survey-card">Fuer diese Umfrage sind noch keine Fragen angelegt.</article>
<article class="survey-card">{{ 'survey.results.no_questions'|trans }}</article>
{% endfor %}
</div>
{% endif %}