diff --git a/Models/SurveyAnswer.php b/Models/SurveyAnswer.php index 77c6c12..057af92 100755 --- a/Models/SurveyAnswer.php +++ b/Models/SurveyAnswer.php @@ -30,7 +30,7 @@ final class SurveyAnswer * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Constructor diff --git a/Models/SurveyTemplate.php b/Models/SurveyTemplate.php index b69544f..fa93aee 100755 --- a/Models/SurveyTemplate.php +++ b/Models/SurveyTemplate.php @@ -36,7 +36,7 @@ class SurveyTemplate * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Status. diff --git a/Models/SurveyTemplateElement.php b/Models/SurveyTemplateElement.php index 344148b..8b0f32b 100755 --- a/Models/SurveyTemplateElement.php +++ b/Models/SurveyTemplateElement.php @@ -32,7 +32,7 @@ class SurveyTemplateElement * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Type. diff --git a/Models/SurveyTemplateElementL11n.php b/Models/SurveyTemplateElementL11n.php index 2600e10..ceea284 100755 --- a/Models/SurveyTemplateElementL11n.php +++ b/Models/SurveyTemplateElementL11n.php @@ -32,7 +32,7 @@ class SurveyTemplateElementL11n implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Surveys ID. diff --git a/Models/SurveyTemplateL11n.php b/Models/SurveyTemplateL11n.php index 5cdc0fc..665dff9 100755 --- a/Models/SurveyTemplateL11n.php +++ b/Models/SurveyTemplateL11n.php @@ -32,7 +32,7 @@ class SurveyTemplateL11n implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Surveys ID. diff --git a/Models/SurveyTemplateLabelL11n.php b/Models/SurveyTemplateLabelL11n.php index 4a3f0f5..e9001a5 100755 --- a/Models/SurveyTemplateLabelL11n.php +++ b/Models/SurveyTemplateLabelL11n.php @@ -32,7 +32,7 @@ class SurveyTemplateLabelL11n implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * element ID. diff --git a/Theme/Backend/surveys-create.tpl.php b/Theme/Backend/surveys-create.tpl.php index ec486bb..2733dae 100755 --- a/Theme/Backend/surveys-create.tpl.php +++ b/Theme/Backend/surveys-create.tpl.php @@ -146,15 +146,15 @@ echo $this->getData('nav')->render(); ?> foreach ($elementValues as $elementValue) : if ($element->type === SurveyElementType::CHECKBOX) : ?>
-
type === SurveyElementType::RADIO) : ?>
-
@@ -163,20 +163,20 @@ echo $this->getData('nav')->render(); ?> elseif ($element->type === SurveyElementType::DROPDOWN) : $elementValues = $element->getValues(); - echo ' + type === SurveyElementType::TEXTAREA) : ?> - + type === SurveyElementType::NUMERIC) : ?> - + type === SurveyElementType::DATE) : ?> - + '; // closing "values-section" echo ''; // closing "survey-value-element" diff --git a/Theme/Backend/surveys-list.tpl.php b/Theme/Backend/surveys-list.tpl.php index 8979492..4c3f6eb 100755 --- a/Theme/Backend/surveys-list.tpl.php +++ b/Theme/Backend/surveys-list.tpl.php @@ -23,14 +23,14 @@ $surveys = $this->getData('surveys') ?? []; /** @var \Modules\Admin\Models\Account $account */ $account = $this->getData('account'); -$accountDir = $account->getId() . ' ' . $account->login; +$accountDir = $account->id . ' ' . $account->login; /** @var \Modules\Media\Models\Collection[] */ $collections = $this->getData('collections'); $mediaPath = \urldecode($this->getData('path') ?? '/'); -$previous = empty($surveys) ? '{/base}/survey/list' : '{/base}/survey/list?{?}&id=' . \reset($surveys)->getId() . '&ptype=p'; -$next = empty($surveys) ? '{/base}/survey/list' : '{/base}/survey/list?{?}&id=' . \end($surveys)->getId() . '&ptype=n'; +$previous = empty($surveys) ? '{/base}/survey/list' : '{/base}/survey/list?{?}&id=' . \reset($surveys)->id . '&ptype=p'; +$next = empty($surveys) ? '{/base}/survey/list' : '{/base}/survey/list?{?}&id=' . \end($surveys)->id . '&ptype=n'; echo $this->getData('nav')->render(); ?> @@ -152,13 +152,13 @@ echo $this->getData('nav')->render(); ?> printHtml($value->name); ?> - printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?> + printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?> printHtml($value->createdAt->format('Y-m-d')); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/survey/edit?{?}&id=' . $value->getId()); + $url = UriFactory::build('{/base}/survey/edit?{?}&id=' . $value->id); ?>