Set tstamp on record inserts/updates
Questions, editor assignments and conditions were inserted without tstamp, so Contao rendered them with tstamp=0 -> the backend "draft" styling (opacity .5), making question rows look greyed out despite being published. - SurveyQuestionRepository::insert()/update() (covers create, edit, duplicate) - SurveyEditorRepository::insert() - SurveyConditionRepository::insert() SurveyRepository already set tstamp. Also widened the assigned-members checkbox-wizard columns at smaller breakpoints. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,7 @@ final class SurveyConditionRepository
|
||||
{
|
||||
$this->connection->insert('tl_survey_condition', [
|
||||
'pid' => $surveyId,
|
||||
'tstamp' => time(),
|
||||
'sourceQuestion' => (int) ($data['sourceQuestion'] ?? 0),
|
||||
'answerValue' => mb_strtolower(trim((string) ($data['answerValue'] ?? ''))),
|
||||
'targetQuestion' => (int) ($data['targetQuestion'] ?? 0),
|
||||
|
||||
@@ -28,6 +28,7 @@ final class SurveyEditorRepository
|
||||
|
||||
$this->connection->insert('tl_survey_editor', [
|
||||
'pid' => $surveyId,
|
||||
'tstamp' => time(),
|
||||
'survey' => $surveyId,
|
||||
'member' => $memberId,
|
||||
]);
|
||||
|
||||
@@ -64,6 +64,7 @@ final class SurveyQuestionRepository
|
||||
|
||||
$this->connection->insert('tl_survey_content', [
|
||||
'pid' => $surveyId,
|
||||
'tstamp' => time(),
|
||||
'sorting' => $sorting,
|
||||
'type' => $type,
|
||||
'question' => (string) ($data['question'] ?? ''),
|
||||
@@ -100,6 +101,7 @@ final class SurveyQuestionRepository
|
||||
$isRangeType = 'range' === $type;
|
||||
|
||||
$this->connection->update('tl_survey_content', [
|
||||
'tstamp' => time(),
|
||||
'type' => $type,
|
||||
'question' => (string) ($data['question'] ?? $question->question),
|
||||
'description' => (string) ($data['description'] ?? $question->description),
|
||||
|
||||
Reference in New Issue
Block a user