From 67fe43bea97e7ccabe7db1d3ea478bac332c1520 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Fri, 22 Oct 2010 13:43:20 +0200 Subject: Bug 523205: editflagtypes.cgi should use Bugzilla::FlagType methods to create and edit flag types a=LpSolit --- template/en/default/admin/flag-type/edit.html.tmpl | 56 ++++++++++------------ template/en/default/filterexceptions.pl | 4 -- template/en/default/global/user-error.html.tmpl | 7 +-- 3 files changed, 28 insertions(+), 39 deletions(-) (limited to 'template/en') diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl index ebebf5082..88c92b4e3 100644 --- a/template/en/default/admin/flag-type/edit.html.tmpl +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -23,20 +23,15 @@ [% PROCESS "global/js-products.html.tmpl" %] -[% IF type.target_type == "bug" %] - [% title = BLOCK %]Create Flag Type for [% terms.Bugs %][% END %] - [% typeLabelLowerPlural = BLOCK %][% terms.bugs %][% END %] - [% typeLabelLowerSingular = BLOCK %][% terms.bug %][% END %] +[% IF action == "insert" %] + [% title = BLOCK %] + Create Flag Type for [% type.target_type == "bug" ? terms.Bugs : "Attachments" %] + [% IF type.id %] + Based on [% type.name FILTER html %] + [% END %] + [% END %] + [% doc_section = "flags-overview.html#flags-create" %] [% ELSE %] - [% title = "Create Flag Type for Attachments" %] - [% typeLabelLowerPlural = BLOCK %]attachments[% END %] - [% typeLabelLowerSingular = BLOCK %]attachment[% END %] -[% END %] - -[% doc_section = "flags-overview.html#flags-create" %] -[% IF last_action == "copy" %] - [% title = BLOCK %]Create Flag Type Based on [% type.name FILTER html %][% END %] -[% ELSIF last_action == "edit" %] [% title = BLOCK %]Edit Flag Type [% type.name FILTER html %][% END %] [% doc_section = "flags-overview.html#flags-edit" %] [% END %] @@ -53,10 +48,10 @@ %]
- + - + [% FOREACH category = type.inclusions %] [% END %] @@ -72,7 +67,7 @@ Name: - a short name identifying this type
+ a short name identifying this type.
@@ -81,7 +76,7 @@ Description: - a comprehensive description of this type
+ a comprehensive description of this type.
[% INCLUDE global/textarea.html.tmpl name = 'description' minrows = 4 @@ -95,9 +90,9 @@ Category: - the products/components to which [% typeLabelLowerPlural %] must - (inclusions) or must not (exclusions) belong in order for users - to be able to set flags of this type for them + 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. @@ -196,7 +191,7 @@ + the same [% type.target_type == "bug" ? terms.bug : "attachment" %]) @@ -204,7 +199,7 @@ @@ -213,19 +208,16 @@ - + diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 099748122..b85bb7acd 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -426,12 +426,8 @@ ], 'admin/flag-type/edit.html.tmpl' => [ - 'action', 'type.id', - 'type.target_type', 'type.sortkey || 1', - 'typeLabelLowerPlural', - 'typeLabelLowerSingular', 'selname', ], diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 4e3ffae50..7d816082d 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -653,7 +653,7 @@ [% ELSIF error == "flag_type_description_invalid" %] [% title = "Flag Type Description Invalid" %] [% admindocslinks = {'flags-overview.html#flags-admin' => 'Administering Flags'} %] - The description must be less than 32K. + You must enter a description for this flag type. [% ELSIF error == "flag_type_name_invalid" %] [% title = "Flag Type Name Invalid" %] @@ -687,8 +687,8 @@ [% ELSIF error == "flag_type_sortkey_invalid" %] [% title = "Flag Type Sort Key Invalid" %] - The sort key must be an integer between 0 and 32767 inclusive. - It cannot be [% sortkey FILTER html %]. + The sort key [% sortkey FILTER html %] must be an integer + between 0 and [% constants.MAX_SMALLINT FILTER none %]. [% ELSIF error == "freetext_too_long" %] [% title = "Text Too Long" %] @@ -756,6 +756,7 @@ [% title = "System Groups not deletable" %] [% name FILTER html %] is a system group. This group cannot be deleted. + [% ELSIF error == "group_unknown" %] [% title = "Unknown Group" %] The group [% name FILTER html %] does not exist. Please specify -- cgit v1.2.3-24-g4f1b
@@ -139,10 +134,10 @@
Sort Key: - a number between 1 and 32767 by which 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
+ a number between 1 and [% constants.MAX_SMALLINT FILTER none %] by which + 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.
Grant Group: the group allowed to grant/deny flags of this type - (to allow all users to grant/deny these flags, select no group)
+ (to allow all users to grant/deny these flags, select no group).
[% PROCESS select selname = "grant_group" %]
Request Group: if flags of this type are requestable, the group allowed to request them - (to allow all users to request these flags, select no group)
+ (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" %]
  - +