Separate survey list controls from editor view
This commit is contained in:
@@ -90,6 +90,16 @@ final class MemberSurveyListController extends AbstractFrontendModuleController
|
||||
$survey = $this->resolveEditableSurvey($surveyId, $memberId);
|
||||
|
||||
try {
|
||||
if ('publish-survey' === $action) {
|
||||
$this->surveyEditorService->publishSurvey($survey, $memberId);
|
||||
$this->addFlash('success', 'Die Umfrage ist jetzt veröffentlicht.');
|
||||
}
|
||||
|
||||
if ('toggle-active' === $action) {
|
||||
$isActive = $this->surveyEditorService->toggleSurveyActive($survey, $memberId);
|
||||
$this->addFlash('success', $isActive ? 'Die Umfrage ist jetzt wieder aktiv.' : 'Die Umfrage wurde vorübergehend deaktiviert.');
|
||||
}
|
||||
|
||||
if ('delete-survey' === $action) {
|
||||
$this->surveyEditorService->deleteSurvey($survey);
|
||||
$this->addFlash('success', 'Die Umfrage mit allen Fragen, Antworten und Ergebnissen wurde gelöscht.');
|
||||
|
||||
Reference in New Issue
Block a user