Newer
Older
<h3>Ticket Collaborators</h3>
<b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
if($info && $info['msg']) {
echo sprintf('<p id="msg_notice" style="padding-top:2px;">%s</p>', $info['msg']);
} ?>
<hr/>
<?php
if(($users=$ticket->getCollaborators())) {?>
<div id="manage_collaborators" <?php echo $form? 'style="display:none;"' : ''; ?>>
<form method="post" class="collaborators" action="#tickets/<?php echo $ticket->getId(); ?>/collaborators">
<table border="0" cellspacing="1" cellpadding="1" width="100%">
<?php
foreach($users as $user) {
$checked = $user->isActive() ? 'checked="checked"' : '';
echo sprintf('<tr>
<td>
<input type="checkbox" name="cid[]" id="c%d" value="%d" %s>
<a class="editcollaborator" href="#collaborators/%d/view">%s</a>
<span class="faded"><em>%s</em></span></td>
<td width="10">
<input type="hidden" name="del[]" id="d%d" value="">
<a class="remove" href="#d%d">×</a></td>
<td width="30"> </td>
</tr>',
$user->getId(),
$user->getId(),
$checked,
$user->getId(),
$user->getName(),
$user->getEmail(),
$user->getId(),
$user->getId());
}
?>
</table>
<hr style="margin-top:1em"/>
<div><a id="addcollaborator" href="#" >Add New Collaborator</a></div>
<div id="savewarning" style="display:none; padding-top:2px;"><p id="msg_warning">You have made changes that you need to save.</p></div>
<p class="full-width">
<span class="buttons" style="float:left">
<input type="reset" value="Reset">
<input type="button" value="Done" class="close">
</span>
<span class="buttons" style="float:right">
<input type="submit" value="Save Changes">
</span>
</p>
</form>
<div class="clear"></div>
</div>
<?php
}
?>
<div id="add_collaborator" <?php echo ($users && !$form)? 'style="display:none;"' : ''; ?>>
<?php
if($info && $info['add_error']) { ?>
<p id="msg_error"><?php echo $info['add_error']; ?></p>
<?php
} ?>
<div>Please complete the form below to add a new collaborator.</div>
<form method="post" class="collaborators" action="#tickets/<?php echo $ticket->getId(); ?>/collaborators/add">
<table width="100%">
<?php
if(!$form) $form = UserForm::getInstance();
$form->render(); ?>
</table>
<hr style="margin-top:1em"/>
<p class="full-width">
<span class="buttons" style="float:left">
<input type="reset" value="Reset">
<input type="button" name="cancel" class="<?php echo !$users ? 'close': 'cancel'; ?>" value="Cancel">
</span>
<span class="buttons" style="float:right">
<input type="submit" value="Add">
</span>
</p>
</form>
<div class="clear"></div>
</div>