Skip to content

Commit 2cb6be0

Browse files
authored
Merge pull request #385 from topcoder-platform/issues-384
Issues-384: fixed Move Discussion popup
2 parents bb0da85 + 7525419 commit 2cb6be0

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php if (!defined('APPLICATION')) exit(); ?>
2+
<h1><?php echo $this->data('Title'); ?></h1>
3+
<?php
4+
echo $this->Form->open();
5+
echo $this->Form->errors();
6+
?>
7+
<div class="Wrap">
8+
<?php
9+
$CountAllowed = val('CountAllowed', $this->Data, 0);
10+
$CountNotAllowed = val('CountNotAllowed', $this->Data, 0);
11+
$CountCheckedDiscussions = val('CountCheckedDiscussions', $this->Data, 0);
12+
13+
if ($CountNotAllowed > 0) {
14+
echo wrap(sprintf(
15+
t('You do not have permission to move %1$s of the selected discussions.'),
16+
$CountNotAllowed
17+
), 'p');
18+
19+
echo wrap(sprintf(
20+
t('You are about to move %1$s of the %2$s of the selected discussions.'),
21+
$CountAllowed,
22+
$CountCheckedDiscussions
23+
), 'p');
24+
} else {
25+
echo wrap(sprintf(
26+
t('You are about to move %s.'),
27+
plural($CountCheckedDiscussions, '%s discussion', '%s discussions')
28+
), 'p');
29+
}
30+
?>
31+
32+
<?php
33+
echo '<div class="P">';
34+
echo '<div class="Category">';
35+
echo $this->Form->label('Category', 'CategoryID'), ' ';
36+
$options = [
37+
'Value' => $this->Data('CategoryID'),
38+
'IncludeNull' => true,
39+
'DiscussionType' => $this->Data('DiscussionType'),
40+
];
41+
echo $this->Form->categoryDropDown('CategoryID', $options);
42+
echo '</div>';
43+
echo '</div>';
44+
45+
echo '<div class="P">'.
46+
$this->Form->checkBox('RedirectLink', 'Leave a redirect link.', ['display' => 'before']).
47+
'</div>';
48+
?>
49+
50+
51+
<?php
52+
echo '<div class="Buttons Buttons-Confirm">';
53+
echo $this->Form->button('Cancel', ['type' => 'button', 'class' => 'Button Close']);
54+
echo $this->Form->button('Move', ['type' => 'submit', 'class' => 'Button Primary Move']);
55+
echo '</div>';
56+
echo '</div>';
57+

0 commit comments

Comments
 (0)