summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-09-02 08:40:56 +0200
committerByron Jones <glob@mozilla.com>2015-09-02 08:40:56 +0200
commit3d463f780fd2051751f276f71e27bb47e96dc2aa (patch)
tree26c7c6f2e745dc2ace396396ed03c7ef8c8f3b7e /template
parente1c42c8fcdf74f5a810aae1384808b635cdc51a4 (diff)
downloadbugzilla-3d463f780fd2051751f276f71e27bb47e96dc2aa.tar.gz
bugzilla-3d463f780fd2051751f276f71e27bb47e96dc2aa.tar.xz
Bug 1196618 - add support for group owners
Diffstat (limited to 'template')
-rw-r--r--template/en/default/admin/groups/create.html.tmpl13
-rw-r--r--template/en/default/admin/groups/edit.html.tmpl14
-rw-r--r--template/en/default/admin/users/edit.html.tmpl16
-rw-r--r--template/en/default/global/messages.html.tmpl2
-rw-r--r--template/en/default/global/user-error.html.tmpl6
5 files changed, 50 insertions, 1 deletions
diff --git a/template/en/default/admin/groups/create.html.tmpl b/template/en/default/admin/groups/create.html.tmpl
index b3ac72372..e5ffb7819 100644
--- a/template/en/default/admin/groups/create.html.tmpl
+++ b/template/en/default/admin/groups/create.html.tmpl
@@ -29,6 +29,8 @@
title = "Add group"
subheader = "This page allows you to define a new user group."
doc_section = "groups.html#create-groups"
+ generate_api_token = 1
+ javascript_urls = [ "js/field.js" ]
%]
<form method="post" action="editgroups.cgi">
@@ -47,6 +49,17 @@
<th>Icon URL:</th>
<td colspan="3"><input type="text" size="70" maxlength="255" id="icon_url" name="icon_url"></td>
</tr>
+ <tr>
+ <th>Owner:</th>
+ <td colspan="3">
+ [% INCLUDE global/userselect.html.tmpl
+ name => "owner"
+ id => "owner"
+ size => 30
+ %]
+ </td>
+ </tr>
+
[% Hook.process('field') %]
</table>
diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl
index 9403c076d..fb54c2c0d 100644
--- a/template/en/default/admin/groups/edit.html.tmpl
+++ b/template/en/default/admin/groups/edit.html.tmpl
@@ -45,6 +45,8 @@
padding-right: .5em;
}
"
+ generate_api_token = 1
+ javascript_urls = [ "js/field.js" ]
%]
<form method="post" action="editgroups.cgi">
@@ -97,6 +99,18 @@
</td>
</tr>
+ <tr>
+ <th>Owner:</th>
+ <td>
+ [% INCLUDE global/userselect.html.tmpl
+ id => "owner"
+ name => "owner"
+ value => group.owner.login
+ size => 30
+ %]
+ </td>
+ </tr>
+
[% IF group.is_bug_group %]
<tr>
<th>Use For [% terms.Bugs %]:</th>
diff --git a/template/en/default/admin/users/edit.html.tmpl b/template/en/default/admin/users/edit.html.tmpl
index fbf283574..64eece345 100644
--- a/template/en/default/admin/users/edit.html.tmpl
+++ b/template/en/default/admin/users/edit.html.tmpl
@@ -136,6 +136,22 @@ $(function() {
</td>
</tr>
+ [% IF otheruser.groups_owned.size %]
+ <tr>
+ <th>Groups Owned:</th>
+ <td>
+ [% can_edit_groups = user.in_group('creategroups') %]
+ [% FOREACH group = otheruser.groups_owned %]
+ [% IF can_edit_groups %]
+ <a href="[% urlbase FILTER none %]editgroups.cgi?action=changeform&amp;group=[% group.id FILTER none %]">
+ [% END %]
+ [% group.name FILTER html %]
+ [% '</a>' IF can_edit_groups %]<br>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+
<tr>
<th>Last Login:</th>
<td>
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index d5d4a563d..83b20f4f6 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -409,6 +409,8 @@
[% END %]
[% CASE 'icon_url' %]
<li>The group icon URL has been updated.</li>
+ [% CASE 'owner_user_id' %]
+ <li>The group owner was updated.</li>
[% CASE 'members_add' %]
<li>The following groups are now members of this group:
[%+ changes.members_add.join(', ') FILTER html %]</li>
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 6f352e5ac..332075b69 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -541,7 +541,11 @@
[% ELSIF error == "empty_group_name" %]
[% title = "The group name can not be empty" %]
You must enter a name for the group.
-
+
+ [% ELSIF error == "group_needs_owner" %]
+ [% title = "Non-System Groups Require Default Owner" %]
+ You must enter a default owner login for non-system groups.
+
[% ELSIF error == "entry_access_denied" %]
[% title = "Permission Denied" %]
[% admindocslinks = {'groups.html' => 'Group Security'} %]