xref: /plugin/bez/tpl/commcause_form.php (revision a99642a4e080c577ca6bae05ecac75de931fb219)
1<?php $id = $this->id('issue', 'id', $template['issue']->id, 'action', $template['commcause_action'], 'kid', $template['commcause_id']) ?>
2<a id="k_"></a>
3<form action="?id=<?php echo $id ?>" method="POST">
4	<input type="hidden" name="id" value="<?php echo $id ?>">
5	<div class="bez_comment bez_comment_form">
6		<div class="bez_avatar">
7			<img src="<?php echo DOKU_URL ?>lib/plugins/bez/images/avatar_default.png" />
8		</div>
9		<div class="bez_text_comment">
10			<span class="bez_arrow-tip-container">
11				<span class="bez_arrow-tip">
12					<span class="bez_arrow-tip-grad"></span>
13				</span>
14			</span>
15			<h2>
16				<?php if ($template['issue']->get_level() >= 15): ?>
17				<ul class="bez_tabs">
18					<li <?php if (!isset($value['type']) || $value['type'] === '0') echo 'class="active"' ?>>
19						<a href="#comment"><?php echo $bezlang['comment_noun'] ?></a></li>
20					<li <?php if($value['type'] === '1' || $value['type'] === '2') echo 'class="active"' ?>>
21						<a href="#cause"><?php echo $bezlang['cause_noun'] ?></a></li>
22				</ul>
23				<?php endif ?>
24				<div class="bez_toolbar"></div>
25			</h2>
26			<div class="bez_content">
27				<textarea data-validation="required" name="content" class="bez_textarea_content" id="content1"><?php echo $value['content'] ?></textarea>
28
29				<input class="bez_comment_type" type="hidden" name="type" value="0" />
30				<?php if ($template['issue']->get_level() >= 15): ?>
31					<div class="bez_cause_type">
32						<div style="margin-bottom: 10px;">
33						<label for="potential">
34							<?php echo $bezlang['cause_type'] ?>:
35						</label>
36						<input type="radio" name="type" value="1"
37							<?php if(!isset($value['type']) || $value['type'] === '0' || $value['type'] === '1') echo 'checked' ?>/>
38							<?php echo $bezlang['cause_type_default'] ?>
39						</label>
40						&nbsp;&nbsp;
41						<input type="radio" name="type" value="2"
42							<?php if($value['type'] === '2') echo 'checked' ?>/>
43							<?php echo $bezlang['cause_type_potential'] ?>
44						</div>
45					</div>
46				<?php endif ?>
47
48				<input type="submit" value="<?php echo isset($template['button']) ? $template['button'] : $bezlang['add'] ?>">
49				 <a href="?id=<?php echo $this->id('issue', 'id', $template['issue']->id) ?>" class="bez_delete_button bez_link_button bez_cancel_button">
50					<?php echo $bezlang['cancel'] ?>
51				</a>
52			</div>
53		</div>
54	</div>
55</form>
56