Fix backend survey action labels
This commit is contained in:
@@ -47,18 +47,15 @@ $GLOBALS['TL_DCA']['tl_survey'] = [
|
||||
],
|
||||
'operations' => [
|
||||
'edit' => [
|
||||
'label' => ['Fragen bearbeiten', 'Fragen der Umfrage bearbeiten'],
|
||||
'href' => 'table=tl_survey_content',
|
||||
'icon' => 'children.svg',
|
||||
],
|
||||
'editheader' => [
|
||||
'label' => ['Umfrage bearbeiten', 'Umfrage bearbeiten'],
|
||||
'href' => 'act=edit',
|
||||
'icon' => 'header.svg',
|
||||
],
|
||||
'publishedWarning' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_survey']['publishedWarning'],
|
||||
'icon' => 'important.svg',
|
||||
'button_callback' => [SurveyDcaListener::class, 'generatePublishedWarningButton'],
|
||||
],
|
||||
'toggle' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_survey']['toggleActive'],
|
||||
'href' => 'act=toggle&field=isActive',
|
||||
@@ -66,12 +63,20 @@ $GLOBALS['TL_DCA']['tl_survey'] = [
|
||||
'primary' => true,
|
||||
'showInHeader' => true,
|
||||
],
|
||||
'publishedWarning' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_survey']['publishedWarning'],
|
||||
'icon' => 'important.svg',
|
||||
'primary' => true,
|
||||
'button_callback' => [SurveyDcaListener::class, 'generatePublishedWarningButton'],
|
||||
],
|
||||
'delete' => [
|
||||
'label' => ['Löschen', 'Eintrag wirklich löschen?'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.svg',
|
||||
'attributes' => 'onclick="if(!confirm(\'Eintrag wirklich löschen?\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'show' => [
|
||||
'label' => ['Details', 'Details des Elements ID %s anzeigen'],
|
||||
'href' => 'act=show',
|
||||
'icon' => 'show.svg',
|
||||
],
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
{% elseif createMode %}
|
||||
<div class="survey-card">
|
||||
<h3>{{ 'survey.edit.create_title'|trans }}</h3>
|
||||
<p>{{ 'survey.edit.create_text'|trans }}</p>
|
||||
{{ form_start(surveyForm, {attr: {class: 'survey-form-grid'}}) }}
|
||||
<input type="hidden" name="REQUEST_TOKEN" value="{{ contao.request_token }}">
|
||||
{{ form_widget(surveyForm._token) }}
|
||||
@@ -94,11 +93,6 @@
|
||||
<strong>{{ question.question|striptags|trim ?: ('survey.edit.question_fallback'|trans({'%id%': question.id})) }}</strong>
|
||||
</span>
|
||||
</span>
|
||||
<span class="survey-meta survey-accordion-actions">
|
||||
<span class="survey-badge neutral">{{ ('survey.survey.question_type_' ~ question.type)|trans }}</span>
|
||||
{% 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 %}
|
||||
</span>
|
||||
</button>
|
||||
</h4>
|
||||
<div class="survey-accordion-panel handorgel__content">
|
||||
@@ -240,9 +234,9 @@
|
||||
<article class="survey-card survey-condition-card">
|
||||
{% set sourceLabel = (condition.sourceQuestionLabel|default('')|striptags|trim) ?: ('survey.edit.question_fallback'|trans({'%id%': condition.sourceQuestion})) %}
|
||||
{% set targetLabel = (condition.targetQuestionLabel|default('')|striptags|trim) ?: ('survey.edit.question_fallback'|trans({'%id%': condition.targetQuestion})) %}
|
||||
<div><strong>Frage {{ condition.sourceQuestion }}: {{ sourceLabel }}</strong></div>
|
||||
<div><strong>Frage {{ condition.sourcePosition ?: condition.sourceQuestion }}: {{ sourceLabel }}</strong></div>
|
||||
<div>{{ 'survey.edit.condition_prefix'|trans({'%value%': condition.answerValue|default('')|striptags|trim|capitalize}) }}</div>
|
||||
<div>weiter zu Frage {{ condition.targetQuestion }}: {{ targetLabel }}</div>
|
||||
<div>weiter zu Frage {{ condition.targetPosition ?: condition.targetQuestion }}: {{ targetLabel }}</div>
|
||||
</article>
|
||||
{% else %}
|
||||
<div>{{ 'survey.edit.no_conditions'|trans }}</div>
|
||||
|
||||
Reference in New Issue
Block a user