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:
@@ -28,18 +28,18 @@ body.survey-question-list-page.survey-question-list-clipboard-active .parent_vie
|
|||||||
|
|
||||||
@media (max-width: 1400px) {
|
@media (max-width: 1400px) {
|
||||||
.tl_checkbox_wizard.survey-assigned-members-checkbox-wizard {
|
.tl_checkbox_wizard.survey-assigned-members-checkbox-wizard {
|
||||||
column-count: 3;
|
column-count: 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1100px) {
|
@media (max-width: 1100px) {
|
||||||
.tl_checkbox_wizard.survey-assigned-members-checkbox-wizard {
|
.tl_checkbox_wizard.survey-assigned-members-checkbox-wizard {
|
||||||
column-count: 2;
|
column-count: 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.tl_checkbox_wizard.survey-assigned-members-checkbox-wizard {
|
.tl_checkbox_wizard.survey-assigned-members-checkbox-wizard {
|
||||||
column-count: 1;
|
column-count: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,6 +62,7 @@ final class SurveyConditionRepository
|
|||||||
{
|
{
|
||||||
$this->connection->insert('tl_survey_condition', [
|
$this->connection->insert('tl_survey_condition', [
|
||||||
'pid' => $surveyId,
|
'pid' => $surveyId,
|
||||||
|
'tstamp' => time(),
|
||||||
'sourceQuestion' => (int) ($data['sourceQuestion'] ?? 0),
|
'sourceQuestion' => (int) ($data['sourceQuestion'] ?? 0),
|
||||||
'answerValue' => mb_strtolower(trim((string) ($data['answerValue'] ?? ''))),
|
'answerValue' => mb_strtolower(trim((string) ($data['answerValue'] ?? ''))),
|
||||||
'targetQuestion' => (int) ($data['targetQuestion'] ?? 0),
|
'targetQuestion' => (int) ($data['targetQuestion'] ?? 0),
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ final class SurveyEditorRepository
|
|||||||
|
|
||||||
$this->connection->insert('tl_survey_editor', [
|
$this->connection->insert('tl_survey_editor', [
|
||||||
'pid' => $surveyId,
|
'pid' => $surveyId,
|
||||||
|
'tstamp' => time(),
|
||||||
'survey' => $surveyId,
|
'survey' => $surveyId,
|
||||||
'member' => $memberId,
|
'member' => $memberId,
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ final class SurveyQuestionRepository
|
|||||||
|
|
||||||
$this->connection->insert('tl_survey_content', [
|
$this->connection->insert('tl_survey_content', [
|
||||||
'pid' => $surveyId,
|
'pid' => $surveyId,
|
||||||
|
'tstamp' => time(),
|
||||||
'sorting' => $sorting,
|
'sorting' => $sorting,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'question' => (string) ($data['question'] ?? ''),
|
'question' => (string) ($data['question'] ?? ''),
|
||||||
@@ -100,6 +101,7 @@ final class SurveyQuestionRepository
|
|||||||
$isRangeType = 'range' === $type;
|
$isRangeType = 'range' === $type;
|
||||||
|
|
||||||
$this->connection->update('tl_survey_content', [
|
$this->connection->update('tl_survey_content', [
|
||||||
|
'tstamp' => time(),
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'question' => (string) ($data['question'] ?? $question->question),
|
'question' => (string) ($data['question'] ?? $question->question),
|
||||||
'description' => (string) ($data['description'] ?? $question->description),
|
'description' => (string) ($data['description'] ?? $question->description),
|
||||||
|
|||||||
Reference in New Issue
Block a user