1<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?>
2<?php $url = $tpl->url('task', 'tid', $tpl->get('task')->id, 'action',
3                       $tpl->param('action') == 'comment_edit' ? 'comment_edit' : 'comment_add',
4                       'zkid', $tpl->param('zkid')) ?>
5<a id="zk_"></a>
6<form class="bez_form_blank" action="<?php echo $url ?>" method="POST">
7    <input type="hidden" name="id" value="">
8    <div class="bez_comment bez_comment_form">
9        <div class="bez_avatar">
10            <img src="<?php echo DOKU_URL ?>lib/plugins/bez/images/avatar_default.png" />
11        </div>
12        <div class="bez_text_comment">
13			<span class="bez_arrow-tip-container">
14				<span class="bez_arrow-tip">
15					<span class="bez_arrow-tip-grad"></span>
16				</span>
17			</span>
18            <div class="commcause_content">
19                <h2>
20                    <div class="bez_toolbar"></div>
21                </h2>
22            </div>
23            <div class="bez_content">
24                <textarea name="content" class="bez_textarea_content" id="content"><?php echo $tpl->value('content') ?></textarea>
25                 <div class="plugin__bez_form_buttons">
26                <div class="plugin__bez_form_buttons_container">
27
28                <?php if ($tpl->param('zkid') != ''): ?>
29                    <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id) ?><?php if ($tpl->param('zkid') != '') echo '#zk'.$tpl->param('zkid') ?>"
30                       class="plugin__bez_button plugin__bez_button_red">
31                        <?php echo $tpl->getLang('cancel') ?>
32                    </a>
33                <?php endif ?>
34
35                <?php if ($tpl->get('task')->state == 'opened'): ?>
36                    <button class="plugin__bez_button plugin__bez_button_green" name="fn" value="comment_add" style="display:none;">
37                        <?php echo $tpl->param('zkid') != '' ? $tpl->getLang('correct') : $tpl->getLang('add_comment') ?>
38                    </button>
39                <?php endif ?>
40                <?php if ($tpl->param('zkid') == '' && $tpl->get('task')->acl_of('state') >= BEZ_PERMISSION_CHANGE): ?>
41                    <?php if ($tpl->get('task')->state == 'opened'): ?>
42                        <button class="plugin__bez_button plugin__bez_button_gray" name="fn" value="task_do">
43                            <?php echo $tpl->getLang('js')['close_without_comment'] ?>
44                        </button>
45                    <?php else: ?>
46                        <button class="plugin__bez_button plugin__bez_button_gray" name="fn" value="task_reopen">
47                            <?php echo $tpl->getLang('js')['reopen_task'] ?>
48                        </button>
49                    <?php endif ?>
50                <?php endif ?>
51                </div>
52                </div>
53            </div>
54        </div>
55    </div>
56</form>
57