Skip to content

Commit 1b60ea7

Browse files
authored
Merge pull request #1933 from ikedas/issue-1932 by ikedas
Broken "distribute" confirmation (#1932)
2 parents e6e824f + 5e04519 commit 1b60ea7

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

default/web_tt2/confirm_action.tt2

+15-7
Original file line numberDiff line numberDiff line change
@@ -473,16 +473,24 @@
473473
[% IF topic_required ~%]
474474
<h3>[%|loc%]This list is configured to require topic(s).[%END%]</h3>
475475
[%~ END %]
476-
<p>[%|loc%]Please select one or more topic(s) that corresponds to the messages you wish to distribute:[%END%]</p>
477-
<ul>
476+
[% IF listconf.msg_topic && listconf.msg_topic.size ~%]
477+
<p>[%|loc%]Please select one or more topic(s) that corresponds to the messages you wish to distribute:[%END%]</p>
478+
<ul>
478479
[% FOREACH t = listconf.msg_topic ~%]
479480
[% NEXT UNLESS t && t.name ~%]
480-
<li>
481-
<input type="checkbox" name="topic" id="topic_[%t.name%]" value="[% t.name %]" />
482-
<label for="topic_[%t.name%]">[% t.title %] </label>
483-
</li>
481+
<li>
482+
<input type="checkbox" name="topic" id="topic_[%t.name%]"
483+
value="[% t.name %]"
484+
[%~ IF topic && topic.size ~%]
485+
[% FOREACH tp = topic ~%]
486+
[% IF t.name == tp %] checked[% END %]
487+
[%~ END %]
488+
[%~ END %] />
489+
<label for="topic_[%t.name%]">[% t.title %] </label>
490+
</li>
484491
[%~ END %]
485-
</ul>
492+
</ul>
493+
[% END %]
486494
[%~ ELSIF confirm_action == 'd_admin' && d_admin == 'delete' ~%]
487495
<input type="hidden" name="d_admin" value="[% d_admin %]" />
488496
[%~ ELSIF confirm_action == 'd_delete' ~%]

0 commit comments

Comments
 (0)