blob: 3a304173b22d3513238e317f9090576ed7fa46d4 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001<table id="perm_defs" class="ifOpened">
2 [if-any offer_edit_perms displayed_extra_perms]
3 <tr><th colspan="2">Standard permissions</th></tr>
4 [end]
5
6 [include "people-detail-row-part.ezt" role_perms.View member_perms.View "View" "View issues"]
7 [include "people-detail-row-part.ezt" role_perms.Commit member_perms.Commit "Commit" "Full project member"]
8
9 [include "people-detail-row-part.ezt" role_perms.CreateIssue member_perms.CreateIssue "CreateIssue" "Enter a new issue"]
10 [include "people-detail-row-part.ezt" role_perms.AddIssueComment member_perms.AddIssueComment "AddIssueComment" "Add a comment to an issue"]
11 [include "people-detail-row-part.ezt" role_perms.EditIssue member_perms.EditIssue "EditIssue" "Edit any attribute of an issue"]
12 [include "people-detail-row-part.ezt" role_perms.EditIssueOwner member_perms.EditIssueOwner "EditIssueOwner" "- Edit the owner of an issue"]
13 [include "people-detail-row-part.ezt" role_perms.EditIssueSummary member_perms.EditIssueSummary "EditIssueSummary" "- Edit the summary of an issue"]
14 [include "people-detail-row-part.ezt" role_perms.EditIssueStatus member_perms.EditIssueStatus "EditIssueStatus" "- Edit the status of an issue"]
15 [include "people-detail-row-part.ezt" role_perms.EditIssueCc member_perms.EditIssueCc "EditIssueCc" "- Edit the CC list of an issue"]
16 [include "people-detail-row-part.ezt" role_perms.DeleteIssue member_perms.DeleteIssue "DeleteIssue" "Delete/undelete an issue"]
17
18 [include "people-detail-row-part.ezt" role_perms.DeleteAny member_perms.DeleteAny "DeleteAny" "Delete comments by anyone"]
19 [include "people-detail-row-part.ezt" role_perms.EditAnyMemberNotes member_perms.EditAnyMemberNotes "EditAnyMemberNotes" "Edit anyone's member notes"]
20 [include "people-detail-row-part.ezt" role_perms.ModerateSpam member_perms.ModerateSpam "ModerateSpam" "Mark or un-mark issues and comments as spam"]
21
22
23
24 [if-any offer_edit_perms displayed_extra_perms]
25 <tr><th colspan="2">Custom permissions</th></tr>
26 [end]
27
28 [if-any offer_edit_perms]
29 <tr>
30 <td id="displayed_extra_perms" colspan="2">
31 <div style="width:12em">
32 [for displayed_extra_perms]
33 <input style="width:100%" name="extra_perms"
34 value="[displayed_extra_perms]">
35 [end]
36 <input style="width:100%" name="extra_perms"
37 id="first_extra_perms"
38 value="" autocomplete="off">
39 </div>
40 </td>
41 </tr>
42 [else]
43 [for displayed_extra_perms]
44 <tr>
45 <td>
46 <input type="checkbox" checked="checked" disabled="disabled">
47 [displayed_extra_perms]
48 </td>
49 <td></td>
50 </tr>
51 [end]
52 [end]
53
54</table>
55
56<script type="text/javascript" nonce="[nonce]">
57runOnLoad(function() {
58 function _addInput(event) {
59 if (event.target.value == "") {
60 return;
61 }
62 var area = event.target.parentNode;
63 var newInput = document.createElement("input");
64 newInput.style.width = "100%";
65 newInput.name = event.target.name;
66 newInput.onfocus = function(e) {
67 _acrob(null);
68 _acof(e);
69 };
70 newInput.setAttribute("autocomplete", "off");
71 newInput.addEventListener("keyup", _addInput);
72 area.appendChild(newInput);
73 area.appendChild(document.createElement("br"));
74
75 // Make it only fire once.
76 event.target.removeEventListener("keyup", _addInput);
77 }
78
79 if ($("first_extra_perms"))
80 $("first_extra_perms").addEventListener("keyup", _addInput);
81});
82</script>