Skip to content

Commit 4c2ee0e

Browse files
committed
fix : 回答内容が表示されない /NetCommons3/NetCommons3/issues/1663
1 parent 5db8e58 commit 4c2ee0e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

View/CircularNotices/view.ctp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
)
2525
);
2626
?>
27+
<?php
28+
$selections = array();
29+
foreach ($circularNoticeChoice as $choice) {
30+
$selections[$choice['id']] = $choice['value'];
31+
}
32+
?>
2733

2834
<header class="clearfix">
2935
<div class="pull-left">
@@ -179,10 +185,8 @@
179185
));
180186
break;
181187
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_SELECTION:
182-
$selections = array();
183188
$selected = '';
184189
foreach ($circularNoticeChoice as $choice) :
185-
$selections[$choice['id']] = $choice['value'];
186190
if ($choice['id'] === $myAnswer['CircularNoticeTargetUser']['reply_selection_value']) :
187191
$selected = $choice['id'];
188192
endif;
@@ -197,11 +201,9 @@
197201
));
198202
break;
199203
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_MULTIPLE_SELECTION:
200-
$selections = array();
201204
$selected = explode(CircularNoticeComponent::SELECTION_VALUES_DELIMITER, $myAnswer['CircularNoticeTargetUser']['reply_selection_value']);
202205
$selectedValue = array();
203206
foreach ($circularNoticeChoice as $choices) :
204-
$selections[$choices['id']] = $choices['value'];
205207
if (in_array($choices['id'], $selected, true)) :
206208
$selectedValue[] = $choices['value'];
207209
endif;

0 commit comments

Comments
 (0)