From 39f3ac48b44c99bd423f62ec70d7108ed8efa19a Mon Sep 17 00:00:00 2001 From: Zhangyu Date: Tue, 3 Sep 2024 07:09:39 +0000 Subject: [PATCH] * [task#127431] add quotedItems of thinkstepbase. --- lib/zin/wg/thinkstepbase/v1.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/zin/wg/thinkstepbase/v1.php b/lib/zin/wg/thinkstepbase/v1.php index 6d53f80569..b3b80e260a 100644 --- a/lib/zin/wg/thinkstepbase/v1.php +++ b/lib/zin/wg/thinkstepbase/v1.php @@ -106,11 +106,25 @@ class thinkStepBase extends wg $app->loadLang('thinkstep'); $app->loadLang('thinkrun'); list($quoteQuestions, $quotedQuestions, $step, $isRun) = $this->prop(array('quoteQuestions', 'quotedQuestions', 'step', 'isRun')); + if(!empty($step->options->fields)) $step->options->fields = is_string($step->options->fields) ? explode(', ', $step->options->fields) : array_values((array)$step->options->fields); + $isCheckBox = $step->type == 'question' && $step->options->questionType == 'checkbox'; $quoteItem = $isCheckBox && !empty($step->options->setOption) && $step->options->setOption == 1; $detailTip = array(); $quotedItems = array(); + foreach($quotedQuestions as $item) + { + $quotedItems[] = a + ( + setClass('block text-primary-500 leading-relaxed'), + set::href(createLink('thinkstep', 'view', "marketID=0&&wizardID=$item->wizard&&stepID=$item->id")), + setData('toggle', 'modal'), + setData('size', 'lg'), + $item->index . '. ' . $item->title + ); + } + return $detailTip; }