summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/fieldvalues
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-07-14 03:00:40 +0200
committerlpsolit%gmail.com <>2006-07-14 03:00:40 +0200
commit12b3b674e4dac42707c39ce2389907f2e4e6a74c (patch)
tree1c2d6e6de10015c50dccf315dd578d9e34c42f57 /template/en/default/admin/fieldvalues
parent8eadcd8aa1b2bdcab8f6d26c97d3cd9eeed252e2 (diff)
downloadbugzilla-12b3b674e4dac42707c39ce2389907f2e4e6a74c.tar.gz
bugzilla-12b3b674e4dac42707c39ce2389907f2e4e6a74c.tar.xz
Bug 94534: Customised resolutions - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'template/en/default/admin/fieldvalues')
-rw-r--r--template/en/default/admin/fieldvalues/confirm-delete.html.tmpl4
-rw-r--r--template/en/default/admin/fieldvalues/edit.html.tmpl11
-rw-r--r--template/en/default/admin/fieldvalues/list.html.tmpl39
3 files changed, 41 insertions, 13 deletions
diff --git a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
index 317f1f4b3..d29c124d6 100644
--- a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
+++ b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
@@ -61,13 +61,13 @@
<h2>Confirmation</h2>
-[% IF (Param(param_name) == value) || bug_count || (value_count == 1) %]
+[% IF (param_name.defined && Param(param_name) == value) || bug_count || (value_count == 1) %]
<p>Sorry, but the '[% value FILTER html %]' value cannot be deleted
from the '[% field FILTER html %]' field for the following reason(s):</p>
<ul class="warningmessages">
- [% IF Param(param_name) == value %]
+ [% IF param_name.defined && Param(param_name) == value %]
<li>'[% value FILTER html %]' is the default value for
the '[% field FILTER html %]' field.
[% IF user.groups.tweakparams %]
diff --git a/template/en/default/admin/fieldvalues/edit.html.tmpl b/template/en/default/admin/fieldvalues/edit.html.tmpl
index c798bb3a9..362ed4753 100644
--- a/template/en/default/admin/fieldvalues/edit.html.tmpl
+++ b/template/en/default/admin/fieldvalues/edit.html.tmpl
@@ -33,8 +33,15 @@
<tr>
<th valign="top"><label for="value">Field Value:</label></th>
- <td><input id="value" size="20" maxlength="60" name="value" value="
- [%- value FILTER html %]"></td>
+ <td>
+ [% IF is_static %]
+ <input type="hidden" name="value" value="[% value FILTER html %]">
+ [% value FILTER html %]
+ [% ELSE %]
+ <input id="value" size="20" maxlength="60" name="value" value="
+ [%- value FILTER html %]">
+ [% END %]
+ </td>
</tr>
<tr>
<th align="right"><label for="sortkey">Sortkey:</label></th>
diff --git a/template/en/default/admin/fieldvalues/list.html.tmpl b/template/en/default/admin/fieldvalues/list.html.tmpl
index d25adf2b1..f446d0f96 100644
--- a/template/en/default/admin/fieldvalues/list.html.tmpl
+++ b/template/en/default/admin/fieldvalues/list.html.tmpl
@@ -21,6 +21,7 @@
# displayed to the user in a list.
#
# field: string; the name of the field we are editing values for.
+ # static: array; list of values which cannot be renamed nor deleted.
#%]
[% USE Bugzilla %]
@@ -58,15 +59,35 @@
} ]
%]
-[% overrides.action = [ {
- match_value => "$default"
- match_field => 'name'
- override_content => 1
- content => "(Default value)"
- override_contentlink => 1
- contentlink => undef
- } ]
-%]
+[% IF default.defined %]
+ [% overrides.action = [ {
+ match_value => "$default"
+ match_field => 'name'
+ override_content => 1
+ content => "(Default value)"
+ override_contentlink => 1
+ contentlink => undef
+ } ]
+ %]
+[% END %]
+
+[% IF static.size %]
+ [% UNLESS overrides.action.size %]
+ [% overrides.action = [] %]
+ [% END %]
+
+ [% FOREACH static_value = static %]
+ [% overrides.action.push({
+ match_value => "$static_value"
+ match_field => 'name'
+ override_content => 1
+ content => "(Non deletable value)"
+ override_contentlink => 1
+ contentlink => undef
+ })
+ %]
+ [% END %]
+[% END %]
[% PROCESS admin/table.html.tmpl
columns = columns