From 6fac08b94b6cd67d8dd7ae8f7eeb5de5233c59d7 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Sat, 4 Dec 2010 02:22:49 +0100 Subject: Bug 529974: Let users with local editcomponents privs manage flags for products they can administer a=LpSolit (module owner) --- template/en/default/admin/flag-type/edit.html.tmpl | 66 ++++++++++++++-------- 1 file changed, 44 insertions(+), 22 deletions(-) (limited to 'template/en/default/admin/flag-type/edit.html.tmpl') diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl index eb0211377..13db9fab1 100644 --- a/template/en/default/admin/flag-type/edit.html.tmpl +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -17,6 +17,7 @@ # # Contributor(s): Myk Melez # Mark Bickford + # Frédéric Buclin #%] [% PROCESS global/variables.none.tmpl %] @@ -42,22 +43,24 @@ table#form th { text-align: right; vertical-align: baseline; white-space: nowrap; } table#form td { text-align: left; vertical-align: baseline; } " - onload="var f = document.forms[0]; selectProduct(f.product, f.component, null, null, '__Any__');" + onload="var f = document.forms['flagtype_properties']; + selectProduct(f.product, f.component, null, null, '__Any__');" javascript_urls=["js/productform.js"] doc_section = doc_section %] -
+ + - [% FOREACH category = type.inclusions %] - + [% FOREACH category = inclusions.values %] + [% END %] - [% FOREACH category = type.exclusions %] - + [% FOREACH category = exclusions.values %] + [% END %] [%# Add a hidden button at the top of the form so that the user pressing "return" @@ -69,8 +72,8 @@ Name: a short name identifying this type.
- + @@ -83,6 +86,7 @@ minrows = 4 cols = 80 defaultcontent = type.description + disabled = !can_fully_edit %] @@ -94,6 +98,12 @@ the products/components to which [% type.target_type == "bug" ? terms.bugs : "attachments" %] must (inclusions) or must not (exclusions) belong in order for users to be able to set flags of this type for them. + [% UNLESS can_fully_edit %] +

This flagtype also applies to some products you are not allowed + to edit (and so which are not displayed in the lists below). Your limited privileges + means you are only allowed to add and remove this flagtype to/from products you can + edit, but not to edit other properties of the flagtype.

+ [% END %] @@ -139,7 +145,8 @@ this type will be sorted when displayed to users in a list; ignore if you don't care what order the types appear in or if you want them to appear in alphabetical order.
- + @@ -147,6 +154,7 @@ @@ -156,6 +164,7 @@ @@ -172,7 +181,8 @@ [% Param('emailsuffix') %] will not be appended to these addresses, so you should add it explicitly if so desired. [% END %]
- + @@ -180,6 +190,7 @@ @@ -211,7 +223,7 @@ if flags of this type are requestable, the group allowed to request them (to allow all users to request these flags, select no group).
Note that the request group alone has no effect if the grant group is not defined!
- [% PROCESS select selname = "request_group" %] + [% PROCESS group_select selname = "request_group" %] @@ -233,8 +245,8 @@ [%# Block for SELECT fields #%] [%############################################################################%] -[% BLOCK select %] - [% FOREACH group = groups %]
@@ -101,17 +111,13 @@

@@ -119,12 +125,12 @@
Inclusions:
- [% PROCESS "global/select-menu.html.tmpl" name="inclusion_to_remove" multiple="1" size="7" options=type.inclusions %]
+ [% PROCESS category_select name="inclusion_to_remove" categories = inclusions %]
Exclusions:
- [% PROCESS "global/select-menu.html.tmpl" name="exclusion_to_remove" multiple="1" size="7" options=type.exclusions %]
+ [% PROCESS category_select name="exclusion_to_remove" categories = exclusions %]
   
  @@ -190,6 +201,7 @@   @@ -201,7 +213,7 @@ the group allowed to grant/deny flags of this type (to allow all users to grant/deny these flags, select no group).
- [% PROCESS select selname = "grant_group" %] + [% PROCESS group_select selname = "grant_group" %]