blob: fc294737d8913f6f0834bd865bf2c4e30fcb0800 [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"]
Copybara854996b2021-09-07 19:36:02 +000020
21
22
23 [if-any offer_edit_perms displayed_extra_perms]
24 <tr><th colspan="2">Custom permissions</th></tr>
25 [end]
26
27 [if-any offer_edit_perms]
28 <tr>
29 <td id="displayed_extra_perms" colspan="2">
30 <div style="width:12em">
31 [for displayed_extra_perms]
32 <input style="width:100%" name="extra_perms"
33 value="[displayed_extra_perms]">
34 [end]
35 <input style="width:100%" name="extra_perms"
36 id="first_extra_perms"
37 value="" autocomplete="off">
38 </div>
39 </td>
40 </tr>
41 [else]
42 [for displayed_extra_perms]
43 <tr>
44 <td>
45 <input type="checkbox" checked="checked" disabled="disabled">
46 [displayed_extra_perms]
47 </td>
48 <td></td>
49 </tr>
50 [end]
51 [end]
52
53</table>
54
55<script type="text/javascript" nonce="[nonce]">
56runOnLoad(function() {
57 function _addInput(event) {
58 if (event.target.value == "") {
59 return;
60 }
61 var area = event.target.parentNode;
62 var newInput = document.createElement("input");
63 newInput.style.width = "100%";
64 newInput.name = event.target.name;
65 newInput.onfocus = function(e) {
66 _acrob(null);
67 _acof(e);
68 };
69 newInput.setAttribute("autocomplete", "off");
70 newInput.addEventListener("keyup", _addInput);
71 area.appendChild(newInput);
72 area.appendChild(document.createElement("br"));
73
74 // Make it only fire once.
75 event.target.removeEventListener("keyup", _addInput);
76 }
77
78 if ($("first_extra_perms"))
79 $("first_extra_perms").addEventListener("keyup", _addInput);
80});
81</script>