diff --git a/contao/dca/tl_survey.php b/contao/dca/tl_survey.php
index 802d0d4..cf58ea8 100644
--- a/contao/dca/tl_survey.php
+++ b/contao/dca/tl_survey.php
@@ -59,6 +59,13 @@ $GLOBALS['TL_DCA']['tl_survey'] = [
'icon' => 'important.svg',
'button_callback' => [SurveyDcaListener::class, 'generatePublishedWarningButton'],
],
+ 'toggle' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_survey']['toggleActive'],
+ 'href' => 'act=toggle&field=isActive',
+ 'icon' => 'visible.svg',
+ 'primary' => true,
+ 'showInHeader' => true,
+ ],
'delete' => [
'href' => 'act=delete',
'icon' => 'delete.svg',
@@ -81,7 +88,7 @@ $GLOBALS['TL_DCA']['tl_survey'] = [
],
],
'palettes' => [
- 'default' => '{title_legend},title,category,description;{assignment_legend},assignedMembers;{publishing_legend},isActive,isTemplate;{meta_legend},createdAt,updatedAt',
+ 'default' => '{title_legend},title,category,description;{assignment_legend},assignedMembers;{publishing_legend},published,isActive,isTemplate;{meta_legend},createdAt,updatedAt',
],
'fields' => [
'id' => [
diff --git a/contao/templates/frontend/_survey_assets.html.twig b/contao/templates/frontend/_survey_assets.html.twig
index 99c088a..d6f806c 100644
--- a/contao/templates/frontend/_survey_assets.html.twig
+++ b/contao/templates/frontend/_survey_assets.html.twig
@@ -413,29 +413,18 @@
height: 2.2rem;
border-radius: 999px;
border: 1px solid rgba(162, 168, 180, 0.62);
- background: rgba(162, 168, 180, 0.22);
+ background: #7f8793;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
- transition: background 0.18s ease, border-color 0.18s ease;
- }
-
- .survey-visibility-dot__icon {
- width: 0.9rem;
- height: 0.9rem;
- border-radius: 50%;
- background: #7f8793;
- display: inline-block;
+ transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.survey-visibility-dot.is-on {
- background: rgba(0, 174, 151, 0.2);
- border-color: rgba(0, 174, 151, 0.68);
- }
-
- .survey-visibility-dot.is-on .survey-visibility-dot__icon {
background: #0a8378;
+ border-color: rgba(0, 174, 151, 0.68);
+ box-shadow: 0 0 0 0.18rem rgba(0, 174, 151, 0.14);
}
.survey-button-row {
diff --git a/contao/templates/frontend/member_survey_list.html.twig b/contao/templates/frontend/member_survey_list.html.twig
index bdad33e..a13648c 100644
--- a/contao/templates/frontend/member_survey_list.html.twig
+++ b/contao/templates/frontend/member_survey_list.html.twig
@@ -94,9 +94,7 @@
-
+