Clean up obsolete survey editor and DCA code

This commit is contained in:
Jürgen Mummert
2026-06-07 22:16:37 +02:00
parent 497b4f962d
commit b7bcdd8372
10 changed files with 6 additions and 95 deletions
@@ -76,7 +76,7 @@ final class MemberSurveyEditController extends AbstractFrontendModuleController
$surveyForm = $this->formFactory->createNamed('survey_meta', SurveyEditorType::class, $survey instanceof SurveyModel ? SurveyEditorData::fromModel($survey) : new SurveyEditorData());
$surveyForm->handleRequest($request);
if ($surveyForm->isSubmitted() && $surveyForm->isValid()) {
if ($surveyForm->isSubmitted() && $surveyForm->isValid() && (!$survey instanceof SurveyModel || '1' !== (string) $survey->published)) {
try {
if ($survey instanceof SurveyModel) {
$this->surveyEditorService->updateSurvey($survey, $memberId, $surveyForm->getData());
@@ -92,6 +92,8 @@ final class MemberSurveyEditController extends AbstractFrontendModuleController
} catch (\Throwable $exception) {
$this->addFlash('error', $exception->getMessage());
}
} elseif ($surveyForm->isSubmitted() && $survey instanceof SurveyModel && '1' === (string) $survey->published) {
$this->addFlash('error', 'Die Metadaten können nach der Veröffentlichung im Frontend nicht mehr geändert werden.');
}
if (!$survey instanceof SurveyModel) {