aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/fieldvalues
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/admin/fieldvalues')
-rw-r--r--template/en/default/admin/fieldvalues/confirm-delete.html.tmpl83
-rw-r--r--template/en/default/admin/fieldvalues/create.html.tmpl13
-rw-r--r--template/en/default/admin/fieldvalues/edit.html.tmpl32
-rw-r--r--template/en/default/admin/fieldvalues/footer.html.tmpl9
-rw-r--r--template/en/default/admin/fieldvalues/list.html.tmpl31
5 files changed, 87 insertions, 81 deletions
diff --git a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
index d18e03a53..12be0e8e4 100644
--- a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
+++ b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
@@ -14,18 +14,14 @@
#%]
[%# INTERFACE:
- # value: string; The field value being deleted.
- # bug_count: number; The number of bugs that have this field value.
- # value_count: number; The number of values left for this field, including
- # this value.
+ # value: Bugzilla::Field::Choice; The field value being deleted.
+ # value_count: number; The number of values available for this field.
# field: object; the field the value is being deleted from.
- # param_name: string; The name of the parameter (defaultxxx) associated
- # with the field.
#%]
[% title = BLOCK %]
- Delete Value '[% value FILTER html %]' from the '[% field.description FILTER html %]'
- ([% field.name FILTER html %]) field
+ Delete Value '[% value.name FILTER html %]' from the
+ '[% field.description FILTER html %]' ([% field.name FILTER html %]) field
[% END %]
[% PROCESS global/header.html.tmpl
@@ -44,15 +40,18 @@
</tr>
<tr>
<td valign="top">Field Value:</td>
- <td valign="top">[% value FILTER html %]</td>
+ <td valign="top">[% value.name FILTER html %]</td>
</tr>
<tr>
<td valign="top">[% terms.Bugs %]:</td>
<td valign="top">
-[% IF bug_count %]
- <a title="List of [% terms.bugs %] where '[% field.description FILTER html %]' is '
- [% value FILTER html %]'"
- href="buglist.cgi?[% field.name FILTER url_quote %]=[%- value FILTER url_quote %]">[% bug_count FILTER html %]</a>
+[% IF value.bug_count %]
+ <a title="List of [% terms.bugs %] where '
+ [%- field.description FILTER html %]' is '
+ [%- value.name FILTER html %]'"
+ href="buglist.cgi?[% field.name FILTER url_quote %]=
+ [%- value.name FILTER url_quote %]">
+ [%- value.bug_count FILTER html %]</a>
[% ELSE %]
None
[% END %]
@@ -62,44 +61,52 @@
<h2>Confirmation</h2>
-[% IF (param_name.defined && Param(param_name) == value) || bug_count || (value_count == 1) %]
+[% IF value.is_default || value.bug_count || (value_count == 1) %]
- <p>Sorry, but the '[% value FILTER html %]' value cannot be deleted
- from the '[% field.description FILTER html %]' field for the following reason(s):</p>
+ <p>Sorry, but the '[% value.name FILTER html %]' value cannot be deleted
+ from the '[% field.description FILTER html %]' field for the following
+ reason(s):</p>
<ul class="warningmessages">
- [% IF param_name.defined && Param(param_name) == value %]
- <li>'[% value FILTER html %]' is the default value for
- the '[% field.description FILTER html %]' field.
- [% IF user.in_group('tweakparams') %]
- You first have to <a href="editparams.cgi?section=bugfields#
- [%- param_name FILTER url_quote %]">change the default value</a> for
- this field before you can delete this value.
- [% END %]
+ [% IF value.is_default %]
+ <li>'[% value.name FILTER html %]' is the default value for
+ the '[% field.description FILTER html %]' field.
+ [% IF user.in_group('tweakparams') %]
+ You first have to <a href="editparams.cgi?section=bugfields">change
+ the default value</a> for this field before you can delete
+ this value.
+ [% END %]
+ </li>
[% END %]
- [% IF bug_count %]
- <li>There
- [% IF bug_count > 1 %]
- are [% bug_count FILTER html %] [%+ terms.bugs %]
- [% ELSE %]
- is 1 [% terms.bug %]
- [% END %]
- with this field value. You must change the field value on
- <a title="List of [% terms.bugs %] where '[% field.description FILTER html %]' is '[% value FILTER html %]'"
- href="buglist.cgi?[% field.name FILTER url_quote %]=[% value FILTER url_quote %]">
- [% IF bug_count > 1 %]
+ [% IF value.bug_count %]
+ <li>
+ [% IF value.bug_count > 1 %]
+ There are [% value.bug_count FILTER html %] [%+ terms.bugs %]
+ with this field value.
+ [% ELSE %]
+ There is is 1 [% terms.bug %] with this field value.
+ [% END %]
+ You must change the field value on
+ <a title="List of [% terms.bugs %] where '
+ [%- field.description FILTER html %]' is '
+ [%- value.name FILTER html %]'"
+ href="buglist.cgi?[% field.name FILTER url_quote %]=
+ [%- value.name FILTER url_quote %]">
+ [% IF value.bug_count > 1 %]
those [% terms.bugs %]
[% ELSE %]
that [% terms.bug %]
[% END %]
</a>
to another value before you can delete this value.
+ </li>
[% END %]
[% IF value_count == 1 %]
- <li>'[% value FILTER html %]' is the last value for
- '[%- field.description FILTER html %]', and so it can not be deleted.
+ <li>'[% value.name FILTER html %]' is the last value for
+ '[%- field.description FILTER html %]', and so it can not be deleted.
+ </li>
[% END %]
</ul>
@@ -111,7 +118,7 @@
<input type="submit" value="Yes, delete" id="delete">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="field" value="[% field.name FILTER html %]">
- <input type="hidden" name="value" value="[% value FILTER html %]">
+ <input type="hidden" name="value" value="[% value.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
</form>
diff --git a/template/en/default/admin/fieldvalues/create.html.tmpl b/template/en/default/admin/fieldvalues/create.html.tmpl
index fe906bfe3..9d318cd1d 100644
--- a/template/en/default/admin/fieldvalues/create.html.tmpl
+++ b/template/en/default/admin/fieldvalues/create.html.tmpl
@@ -26,26 +26,27 @@
%]
<p>
- This page allows you to add a new value for the '[% field.description FILTER html %]' field.
+ This page allows you to add a new value for the
+ '[% field.description FILTER html %]' field.
</p>
<form method="post" action="editvalues.cgi">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<th align="right"><label for="value">Value:</label></th>
- <td><input id="value" size="30" maxlength="60" name="value"
- value=""></td>
+ <td><input id="value" name="value" size="30"
+ maxlength="[% constants.MAX_FIELD_VALUE_SIZE %]"></td>
</tr>
<tr>
<th align="right"><label for="sortkey">Sortkey:</label></th>
- <td><input id="sortkey" size="10" maxlength="20" name="sortkey"
- value=""></td>
+ <td><input id="sortkey" name="sortkey" size="6" maxlength="6"></td>
</tr>
[% IF field.name == "bug_status" %]
<tr>
<th align="right"><label for="is_open">Status Type:</label></th>
<td>
- <input type="radio" id="open_status" name="is_open" value="1" checked="checked">
+ <input type="radio" id="open_status" name="is_open" value="1"
+ checked="checked">
<label for="open_status">Open</label><br>
<input type="radio" id="closed_status" name="is_open" value="0">
<label for="closed_status">Closed (requires a Resolution)</label>
diff --git a/template/en/default/admin/fieldvalues/edit.html.tmpl b/template/en/default/admin/fieldvalues/edit.html.tmpl
index 98b480ba8..29f881ec8 100644
--- a/template/en/default/admin/fieldvalues/edit.html.tmpl
+++ b/template/en/default/admin/fieldvalues/edit.html.tmpl
@@ -14,16 +14,15 @@
#%]
[%# INTERFACE:
- # value: string; The field value we are editing.
- # sortkey: number; Sortkey of the field value we are editing.
- # field: object; The field this value belongs to.
+ # value: Bugzilla::Field::Choice; The field value we are editing.
+ # field: Bugzilla::Field; The field this value belongs to.
#%]
[% PROCESS global/variables.none.tmpl %]
[% title = BLOCK %]
- Edit Value '[% value FILTER html %]' for the '[% field.description FILTER html %]'
- ([% field.name FILTER html %]) field
+ Edit Value '[% value.name FILTER html %]' for the
+ '[% field.description FILTER html %]' ([% field.name FILTER html %]) field
[% END %]
[% PROCESS global/header.html.tmpl
title = title
@@ -33,32 +32,33 @@
<table border="0" cellpadding="4" cellspacing="0">
<tr>
- <th valign="top"><label for="value">Field Value:</label></th>
+ <th valign="top"><label for="value_new">Field Value:</label></th>
<td>
- [% IF is_static %]
- <input type="hidden" name="value" value="[% value FILTER html %]">
- [% value FILTER html %]
+ [% IF value.is_static %]
+ <input type="hidden" name="value_new" id="value_new"
+ value="[% value.name FILTER html %]">
+ [%- value.name FILTER html %]
[% ELSE %]
- <input id="value" size="20" maxlength="60" name="value" value="
- [%- value FILTER html %]">
+ <input id="value_new" name="value_new" size="20"
+ maxlength="[% constants.MAX_FIELD_VALUE_SIZE %]"
+ value="[% value.name FILTER html %]">
[% END %]
</td>
</tr>
<tr>
<th align="right"><label for="sortkey">Sortkey:</label></th>
- <td><input id="sortkey" size="20" maxlength="20" name="sortkey" value="
- [%- sortkey FILTER html %]"></td>
+ <td><input id="sortkey" size="6" maxlength="6" name="sortkey"
+ value="[%- value.sortkey FILTER html %]"></td>
</tr>
[% IF field.name == "bug_status" %]
<tr>
<th align="right"><label for="is_open">Status Type:</label></th>
- <td>[% IF is_open %]Open[% ELSE %]Closed[% END %]</td>
+ <td>[% IF value.is_open %]Open[% ELSE %]Closed[% END %]</td>
</tr>
[% END %]
</table>
- <input type="hidden" name="valueold" value="[% value FILTER html %]">
- <input type="hidden" name="sortkeyold" value="[% sortkey FILTER html %]">
+ <input type="hidden" name="value" value="[% value.name FILTER html %]">
<input type="hidden" name="action" value="update">
<input type="hidden" name="field" value="[% field.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
diff --git a/template/en/default/admin/fieldvalues/footer.html.tmpl b/template/en/default/admin/fieldvalues/footer.html.tmpl
index dcb6dbc8d..288612d4c 100644
--- a/template/en/default/admin/fieldvalues/footer.html.tmpl
+++ b/template/en/default/admin/fieldvalues/footer.html.tmpl
@@ -35,13 +35,14 @@
[%- field.name FILTER url_quote %]">Add</a> a value.
[% END %]
-[% IF value && !no_edit_link %]
+[% IF value.defined && !no_edit_link %]
Edit value <a
- title="Edit value '[% value FILTER html %]' for the '
+ title="Edit value '[% value.name FILTER html %]' for the '
[%- field.name FILTER html %]' field"
href="editvalues.cgi?action=edit&amp;field=
- [%- field.name FILTER url_quote %]&amp;value=[% value FILTER url_quote %]">
- '[% value FILTER html %]'</a>.
+ [%- field.name FILTER url_quote %]&amp;value=
+ [%- value.name FILTER url_quote %]">
+ '[% value.name FILTER html %]'</a>.
[% END %]
[% UNLESS no_edit_other_link %]
diff --git a/template/en/default/admin/fieldvalues/list.html.tmpl b/template/en/default/admin/fieldvalues/list.html.tmpl
index d14bbc26d..976b58ae7 100644
--- a/template/en/default/admin/fieldvalues/list.html.tmpl
+++ b/template/en/default/admin/fieldvalues/list.html.tmpl
@@ -58,26 +58,13 @@
} ]
%]
-[% 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 %]
+[% SET overrides.action = [] %]
+[% FOREACH check_value = values %]
- [% FOREACH static_value = static %]
+ [% IF check_value.is_static %]
[% overrides.action.push({
- match_value => "$static_value"
+ match_value => check_value.name
match_field => 'name'
override_content => 1
content => "(Non-deletable value)"
@@ -85,7 +72,17 @@
contentlink => undef
})
%]
+ [% ELSIF check_value.is_default %]
+ [% overrides.action.push({
+ match_value => check_value.name
+ match_field => 'name'
+ override_content => 1
+ content => "(Default value)"
+ override_contentlink => 1
+ contentlink => undef })
+ %]
[% END %]
+
[% END %]
[% PROCESS admin/table.html.tmpl