Commit 4e4bfa3f authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 369987: Display real field names in editvalues.cgi - Patch by Fré©ric…

Bug 369987: Display real field names in editvalues.cgi - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
parent d67e20bc
...@@ -27,6 +27,7 @@ use Bugzilla::Error; ...@@ -27,6 +27,7 @@ use Bugzilla::Error;
use Bugzilla::Constants; use Bugzilla::Constants;
use Bugzilla::Config qw(:admin); use Bugzilla::Config qw(:admin);
use Bugzilla::Token; use Bugzilla::Token;
use Bugzilla::Field;
# List of different tables that contain the changeable field values # List of different tables that contain the changeable field values
# (the old "enums.") Keep them in alphabetical order by their # (the old "enums.") Keep them in alphabetical order by their
...@@ -63,13 +64,13 @@ sub FieldMustExist { ...@@ -63,13 +64,13 @@ sub FieldMustExist {
# Is it a valid field to be editing? # Is it a valid field to be editing?
FieldExists($field) || FieldExists($field) ||
ThrowUserError('fieldname_invalid', {'field' => $field}); ThrowUserError('fieldname_invalid', {'field' => $field});
return new Bugzilla::Field({name => $field});
} }
# Returns if the specified value exists for the field specified. # Returns if the specified value exists for the field specified.
sub ValueExists { sub ValueExists {
my ($field, $value) = @_; my ($field, $value) = @_;
FieldMustExist($field);
trick_taint($field);
# Value is safe because it's being passed only to a SELECT # Value is safe because it's being passed only to a SELECT
# statement via a placeholder. # statement via a placeholder.
trick_taint($value); trick_taint($value);
...@@ -155,20 +156,19 @@ unless ($field) { ...@@ -155,20 +156,19 @@ unless ($field) {
exit; exit;
} }
# At this point, the field is defined.
$vars->{'field'} = FieldMustExist($field);
trick_taint($field);
# #
# action='' -> Show nice list of values. # action='' -> Show nice list of values.
# #
unless ($action) { unless ($action) {
FieldMustExist($field); my $fieldvalues =
# Now we know the $field is valid.
trick_taint($field);
my $fieldvalues =
$dbh->selectall_arrayref("SELECT value AS name, sortkey" $dbh->selectall_arrayref("SELECT value AS name, sortkey"
. " FROM $field ORDER BY sortkey, value", . " FROM $field ORDER BY sortkey, value",
{Slice =>{}}); {Slice =>{}});
$vars->{'field'} = $field;
$vars->{'values'} = $fieldvalues; $vars->{'values'} = $fieldvalues;
$vars->{'default'} = Bugzilla->params->{$defaults{$field}} if defined $defaults{$field}; $vars->{'default'} = Bugzilla->params->{$defaults{$field}} if defined $defaults{$field};
$vars->{'static'} = $static{$field} if exists $static{$field}; $vars->{'static'} = $static{$field} if exists $static{$field};
...@@ -184,10 +184,7 @@ unless ($action) { ...@@ -184,10 +184,7 @@ unless ($action) {
# (next action will be 'new') # (next action will be 'new')
# #
if ($action eq 'add') { if ($action eq 'add') {
FieldMustExist($field);
$vars->{'value'} = $value; $vars->{'value'} = $value;
$vars->{'field'} = $field;
$vars->{'token'} = issue_session_token('add_field_value'); $vars->{'token'} = issue_session_token('add_field_value');
$template->process("admin/fieldvalues/create.html.tmpl", $template->process("admin/fieldvalues/create.html.tmpl",
$vars) $vars)
...@@ -202,8 +199,6 @@ if ($action eq 'add') { ...@@ -202,8 +199,6 @@ if ($action eq 'add') {
# #
if ($action eq 'new') { if ($action eq 'new') {
check_token_data($token, 'add_field_value'); check_token_data($token, 'add_field_value');
FieldMustExist($field);
trick_taint($field);
# Cleanups and validity checks # Cleanups and validity checks
$value || ThrowUserError('fieldvalue_undefined'); $value || ThrowUserError('fieldvalue_undefined');
...@@ -235,7 +230,6 @@ if ($action eq 'new') { ...@@ -235,7 +230,6 @@ if ($action eq 'new') {
delete_token($token); delete_token($token);
$vars->{'value'} = $value; $vars->{'value'} = $value;
$vars->{'field'} = $field;
$template->process("admin/fieldvalues/created.html.tmpl", $template->process("admin/fieldvalues/created.html.tmpl",
$vars) $vars)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
...@@ -250,7 +244,6 @@ if ($action eq 'new') { ...@@ -250,7 +244,6 @@ if ($action eq 'new') {
# #
if ($action eq 'del') { if ($action eq 'del') {
ValueMustExist($field, $value); ValueMustExist($field, $value);
trick_taint($field);
trick_taint($value); trick_taint($value);
# See if any bugs are still using this value. # See if any bugs are still using this value.
...@@ -261,7 +254,6 @@ if ($action eq 'del') { ...@@ -261,7 +254,6 @@ if ($action eq 'del') {
$dbh->selectrow_array("SELECT COUNT(*) FROM $field"); $dbh->selectrow_array("SELECT COUNT(*) FROM $field");
$vars->{'value'} = $value; $vars->{'value'} = $value;
$vars->{'field'} = $field;
$vars->{'param_name'} = $defaults{$field}; $vars->{'param_name'} = $defaults{$field};
# If the value cannot be deleted, throw an error. # If the value cannot be deleted, throw an error.
...@@ -286,7 +278,6 @@ if ($action eq 'delete') { ...@@ -286,7 +278,6 @@ if ($action eq 'delete') {
ValueMustExist($field, $value); ValueMustExist($field, $value);
$vars->{'value'} = $value; $vars->{'value'} = $value;
$vars->{'field'} = $field;
$vars->{'param_name'} = $defaults{$field}; $vars->{'param_name'} = $defaults{$field};
if (defined $defaults{$field} if (defined $defaults{$field}
...@@ -299,7 +290,6 @@ if ($action eq 'delete') { ...@@ -299,7 +290,6 @@ if ($action eq 'delete') {
ThrowUserError('fieldvalue_not_deletable', $vars); ThrowUserError('fieldvalue_not_deletable', $vars);
} }
trick_taint($field);
trick_taint($value); trick_taint($value);
$dbh->bz_lock_tables('bugs READ', "$field WRITE"); $dbh->bz_lock_tables('bugs READ', "$field WRITE");
...@@ -334,14 +324,12 @@ if ($action eq 'delete') { ...@@ -334,14 +324,12 @@ if ($action eq 'delete') {
# #
if ($action eq 'edit') { if ($action eq 'edit') {
ValueMustExist($field, $value); ValueMustExist($field, $value);
trick_taint($field);
trick_taint($value); trick_taint($value);
$vars->{'sortkey'} = $dbh->selectrow_array( $vars->{'sortkey'} = $dbh->selectrow_array(
"SELECT sortkey FROM $field WHERE value = ?", undef, $value) || 0; "SELECT sortkey FROM $field WHERE value = ?", undef, $value) || 0;
$vars->{'value'} = $value; $vars->{'value'} = $value;
$vars->{'field'} = $field;
$vars->{'is_static'} = (lsearch($static{$field}, $value) >= 0) ? 1 : 0; $vars->{'is_static'} = (lsearch($static{$field}, $value) >= 0) ? 1 : 0;
$vars->{'token'} = issue_session_token('edit_field_value'); $vars->{'token'} = issue_session_token('edit_field_value');
...@@ -361,12 +349,9 @@ if ($action eq 'update') { ...@@ -361,12 +349,9 @@ if ($action eq 'update') {
my $sortkeyold = trim($cgi->param('sortkeyold') || '0'); my $sortkeyold = trim($cgi->param('sortkeyold') || '0');
ValueMustExist($field, $valueold); ValueMustExist($field, $valueold);
trick_taint($field);
trick_taint($valueold); trick_taint($valueold);
$vars->{'value'} = $value; $vars->{'value'} = $value;
$vars->{'field'} = $field;
# If the value cannot be renamed, throw an error. # If the value cannot be renamed, throw an error.
if (lsearch($static{$field}, $valueold) >= 0 && $value ne $valueold) { if (lsearch($static{$field}, $valueold) >= 0 && $value ne $valueold) {
$vars->{'old_value'} = $valueold; $vars->{'old_value'} = $valueold;
......
...@@ -19,13 +19,15 @@ ...@@ -19,13 +19,15 @@
# bug_count: number; The number of bugs that have this field value. # bug_count: number; The number of bugs that have this field value.
# value_count: number; The number of values left for this field, including # value_count: number; The number of values left for this field, including
# this value. # this value.
# field: string; The name of the field. # field: object; the field the value is being deleted from.
# param_name: string; The name of the parameter (defaultxxx) associated # param_name: string; The name of the parameter (defaultxxx) associated
# with the field. # with the field.
#%] #%]
[% title = BLOCK %]Delete Value '[% value FILTER html %]' from the [% title = BLOCK %]
'[% field FILTER html %]' field[% END %] Delete Value '[% value FILTER html %]' from the '[% field.description FILTER html %]'
([% field.name FILTER html %]) field
[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
...@@ -39,7 +41,7 @@ ...@@ -39,7 +41,7 @@
</tr> </tr>
<tr> <tr>
<td valign="top">Field Name:</td> <td valign="top">Field Name:</td>
<td valign="top">[% field FILTER html %]</td> <td valign="top">[% field.description FILTER html %]</td>
</tr> </tr>
<tr> <tr>
<td valign="top">Field Value:</td> <td valign="top">Field Value:</td>
...@@ -49,9 +51,9 @@ ...@@ -49,9 +51,9 @@
<td valign="top">[% terms.Bugs %]:</td> <td valign="top">[% terms.Bugs %]:</td>
<td valign="top"> <td valign="top">
[% IF bug_count %] [% IF bug_count %]
<a title="List of [% terms.bugs %] where '[% field FILTER html %]' is ' <a title="List of [% terms.bugs %] where '[% field.description FILTER html %]' is '
[% value FILTER html %]'" [% value FILTER html %]'"
href="buglist.cgi?[% field FILTER url_quote %]=[%- value FILTER url_quote %]">[% bug_count FILTER html %]</a> href="buglist.cgi?[% field.name FILTER url_quote %]=[%- value FILTER url_quote %]">[% bug_count FILTER html %]</a>
[% ELSE %] [% ELSE %]
None None
[% END %] [% END %]
...@@ -64,12 +66,12 @@ ...@@ -64,12 +66,12 @@
[% IF (param_name.defined && 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 <p>Sorry, but the '[% value FILTER html %]' value cannot be deleted
from the '[% field FILTER html %]' field for the following reason(s):</p> from the '[% field.description FILTER html %]' field for the following reason(s):</p>
<ul class="warningmessages"> <ul class="warningmessages">
[% IF param_name.defined && Param(param_name) == value %] [% IF param_name.defined && Param(param_name) == value %]
<li>'[% value FILTER html %]' is the default value for <li>'[% value FILTER html %]' is the default value for
the '[% field FILTER html %]' field. the '[% field.description FILTER html %]' field.
[% IF user.groups.tweakparams %] [% IF user.groups.tweakparams %]
You first have to <a href="editparams.cgi?section=bugfields# You first have to <a href="editparams.cgi?section=bugfields#
[%- param_name FILTER url_quote %]">change the default value</a> for [%- param_name FILTER url_quote %]">change the default value</a> for
...@@ -85,8 +87,8 @@ ...@@ -85,8 +87,8 @@
is 1 [% terms.bug %] is 1 [% terms.bug %]
[% END %] [% END %]
with this field value. You must change the field value on with this field value. You must change the field value on
<a title="List of [% terms.bugs %] where '[% field FILTER html %]' is '[% value FILTER html %]'" <a title="List of [% terms.bugs %] where '[% field.description FILTER html %]' is '[% value FILTER html %]'"
href="buglist.cgi?[% field FILTER url_quote %]=[% value FILTER url_quote %]"> href="buglist.cgi?[% field.name FILTER url_quote %]=[% value FILTER url_quote %]">
[% IF bug_count > 1 %] [% IF bug_count > 1 %]
those [% terms.bugs %] those [% terms.bugs %]
[% ELSE %] [% ELSE %]
...@@ -98,7 +100,7 @@ ...@@ -98,7 +100,7 @@
[% IF value_count == 1 %] [% IF value_count == 1 %]
<li>'[% value FILTER html %]' is the last value for <li>'[% value FILTER html %]' is the last value for
'[%- field FILTER html %]', and so it can not be deleted. '[%- field.description FILTER html %]', and so it can not be deleted.
[% END %] [% END %]
</ul> </ul>
...@@ -109,7 +111,7 @@ ...@@ -109,7 +111,7 @@
<form method="post" action="editvalues.cgi"> <form method="post" action="editvalues.cgi">
<input type="submit" value="Yes, delete" id="delete"> <input type="submit" value="Yes, delete" id="delete">
<input type="hidden" name="action" value="delete"> <input type="hidden" name="action" value="delete">
<input type="hidden" name="field" value="[% field FILTER html %]"> <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 FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]">
</form> </form>
......
...@@ -15,17 +15,20 @@ ...@@ -15,17 +15,20 @@
#%] #%]
[%# INTERFACE: [%# INTERFACE:
# field: string; name of the field the value is being created for # field: object; the field the value is being created for
#%] #%]
[% title = BLOCK %]Add Value for the '[% field FILTER html %]' field[% END %] [% title = BLOCK %]
[% subheader = BLOCK %]This page allows you to add a new value for the Add Value for the '[% field.description FILTER html %]' ([% field.name FILTER html %]) field
'[% field FILTER html %]' field.[% END %] [% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
subheader = subheader
%] %]
<p>
This page allows you to add a new value for the '[% field.description FILTER html %]' field.
</p>
<form method="post" action="editvalues.cgi"> <form method="post" action="editvalues.cgi">
<table border="0" cellpadding="4" cellspacing="0"> <table border="0" cellpadding="4" cellspacing="0">
<tr> <tr>
...@@ -41,7 +44,7 @@ ...@@ -41,7 +44,7 @@
</table> </table>
<input type="submit" id="create" value="Add"> <input type="submit" id="create" value="Add">
<input type="hidden" name="action" value="new"> <input type="hidden" name="action" value="new">
<input type="hidden" name='field' value="[% field FILTER html %]"> <input type="hidden" name='field' value="[% field.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]">
</form> </form>
......
...@@ -16,21 +16,23 @@ ...@@ -16,21 +16,23 @@
[%# INTERFACE: [%# INTERFACE:
# value: string; the name of the newly created field value # value: string; the name of the newly created field value
# field: string; the name of the field the value belongs to # field: object; the field the value belongs to
#%] #%]
[% title = BLOCK %]New Value '[% value FILTER html %]' added to [% title = BLOCK %]
'[% field FILTER html %]' field[% END %] New Value '[% value FILTER html %]' added to '[% field.description FILTER html %]'
([% field.name FILTER html %]) field
[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
%] %]
<p>The value '<a title="Edit value '[% value FILTER html %]' of <p>The value '<a title="Edit value '[% value FILTER html %]' of
for the '[% field FILTER html %]' field" for the '[% field.description FILTER html %]' field"
href="editvalues.cgi?action=edit&amp;field= href="editvalues.cgi?action=edit&amp;field=
[%- field FILTER url_quote %]&amp;value=[% value FILTER url_quote %]"> [%- field.name FILTER url_quote %]&amp;value=[% value FILTER url_quote %]">
[%- value FILTER html %]</a>' has been added as a valid choice for [%- value FILTER html %]</a>' has been added as a valid choice for
the '[% field FILTER html %]' field.</p> the '[% field.description FILTER html %]' field.</p>
[% PROCESS admin/fieldvalues/footer.html.tmpl %] [% PROCESS admin/fieldvalues/footer.html.tmpl %]
......
...@@ -17,12 +17,14 @@ ...@@ -17,12 +17,14 @@
[%# INTERFACE: [%# INTERFACE:
# value: string; the field value that was deleted. # value: string; the field value that was deleted.
# #
# field: string; the field the value was deleted from. # field: object; the field the value was deleted from.
# #
#%] #%]
[% title = BLOCK %]Deleted Value '[% value FILTER html %]' for the [% title = BLOCK %]
'[% field FILTER html %]' Field[% END %] Deleted Value '[% value FILTER html %]' for the '[% field.description FILTER html %]'
([% field.name FILTER html %]) Field
[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
%] %]
......
...@@ -17,13 +17,15 @@ ...@@ -17,13 +17,15 @@
[%# INTERFACE: [%# INTERFACE:
# value: string; The field value we are editing. # value: string; The field value we are editing.
# sortkey: number; Sortkey of the field value we are editing. # sortkey: number; Sortkey of the field value we are editing.
# field: string; The field this value belongs to. # field: object; The field this value belongs to.
#%] #%]
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% title = BLOCK %]Edit Value '[% value FILTER html %]' ' [% title = BLOCK %]
[%- field FILTER html %]'[% END %] Edit Value '[% value FILTER html %]' for the '[% field.description FILTER html %]'
([% field.name FILTER html %]) field
[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
%] %]
...@@ -54,7 +56,7 @@ ...@@ -54,7 +56,7 @@
<input type="hidden" name="valueold" value="[% value FILTER html %]"> <input type="hidden" name="valueold" value="[% value FILTER html %]">
<input type="hidden" name="sortkeyold" value="[% sortkey FILTER html %]"> <input type="hidden" name="sortkeyold" value="[% sortkey FILTER html %]">
<input type="hidden" name="action" value="update"> <input type="hidden" name="action" value="update">
<input type="hidden" name="field" value="[% field FILTER html %]"> <input type="hidden" name="field" value="[% field.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]">
<input type="submit" id="update" value="Update"> <input type="submit" id="update" value="Update">
</form> </form>
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
[%# INTERFACE: [%# INTERFACE:
# value: string; the value being inserted/edited. # value: string; the value being inserted/edited.
# field: string; the name of the field which the value # field: object; the field which the value belongs/belonged to.
# belongs/belonged to
# #
# no_XXX_link: boolean; if defined, then don't show the corresponding # no_XXX_link: boolean; if defined, then don't show the corresponding
# link. Supported parameters are: # link. Supported parameters are:
...@@ -32,24 +31,24 @@ ...@@ -32,24 +31,24 @@
<p> <p>
[% UNLESS no_add_link %] [% UNLESS no_add_link %]
<a title="Add a value for the '[% field FILTER html %]' field." <a title="Add a value for the '[% field.description FILTER html %]' field."
href="editvalues.cgi?action=add&amp;field= href="editvalues.cgi?action=add&amp;field=
[%- field FILTER url_quote %]">Add</a> a value. [%- field.name FILTER url_quote %]">Add</a> a value.
[% END %] [% END %]
[% IF value && !no_edit_link %] [% IF value && !no_edit_link %]
Edit value <a Edit value <a
title="Edit value '[% value FILTER html %]' for the ' title="Edit value '[% value FILTER html %]' for the '
[%- field FILTER html %]' field" [%- field.name FILTER html %]' field"
href="editvalues.cgi?action=edit&amp;field= href="editvalues.cgi?action=edit&amp;field=
[%- field FILTER url_quote %]&amp;value=[% value FILTER url_quote %]"> [%- field.name FILTER url_quote %]&amp;value=[% value FILTER url_quote %]">
'[% value FILTER html %]'</a>. '[% value FILTER html %]'</a>.
[% END %] [% END %]
[% UNLESS no_edit_other_link %] [% UNLESS no_edit_other_link %]
Edit other values for the <a Edit other values for the <a
href="editvalues.cgi?field= href="editvalues.cgi?field=
[%- field FILTER url_quote %]">'[% field FILTER html %]'</a> field. [%- field.name FILTER url_quote %]">'[% field.description FILTER html %]'</a> field.
[% END %] [% END %]
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# - sortkey: number; The sortkey used to order the value when # - sortkey: number; The sortkey used to order the value when
# displayed to the user in a list. # displayed to the user in a list.
# #
# field: string; the name of the field we are editing values for. # field: object; the field we are editing values for.
# static: array; list of values which cannot be renamed nor deleted. # static: array; list of values which cannot be renamed nor deleted.
#%] #%]
...@@ -29,16 +29,16 @@ ...@@ -29,16 +29,16 @@
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% title = BLOCK %]Select value for the [% title = BLOCK %]Select value for the '[% field.description FILTER html %]'
'[% field FILTER html %]' field[% END %] ([% field.name FILTER html %]) field[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
%] %]
[% edit_contentlink = BLOCK %]editvalues.cgi?action=edit&amp;field= [% edit_contentlink = BLOCK %]editvalues.cgi?action=edit&amp;field=
[%- field FILTER url_quote %]&amp;value=%%name%%[% END %] [%- field.name FILTER url_quote %]&amp;value=%%name%%[% END %]
[% delete_contentlink = BLOCK %]editvalues.cgi?action=del&amp;field= [% delete_contentlink = BLOCK %]editvalues.cgi?action=del&amp;field=
[%- field FILTER url_quote %]&amp;value=%%name%%[% END %] [%- field.name FILTER url_quote %]&amp;value=%%name%%[% END %]
[% columns = [ [% columns = [
......
...@@ -23,13 +23,15 @@ ...@@ -23,13 +23,15 @@
# #
# value & updated_value: the name of the field value # value & updated_value: the name of the field value
# sortkey & updated_sortkey: the field value sortkey # sortkey & updated_sortkey: the field value sortkey
# field: string; the field that the value belongs to # field: object; the field that the value belongs to
# default_value_updated: boolean; whether the default value for # default_value_updated: boolean; whether the default value for
# this field has been updated # this field has been updated
#%] #%]
[% title = BLOCK %]Updating Value '[% value FILTER html %]' of the [% title = BLOCK %]
'[% field FILTER html %]' Field[% END %] Updating Value '[% value FILTER html %]' of the '[% field.description FILTER html %]'
([% field.name FILTER html %]) Field
[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = title title = title
%] %]
......
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
[% ELSIF error == "fieldvalue_already_exists" %] [% ELSIF error == "fieldvalue_already_exists" %]
[% title = "Field Value Already Exists" %] [% title = "Field Value Already Exists" %]
The value '[% value FILTER html %]' already exists for the The value '[% value FILTER html %]' already exists for the
'[%- field FILTER html %]' field. '[%- field.description FILTER html %]' field.
[% ELSIF error == "fieldvalue_doesnt_exist" %] [% ELSIF error == "fieldvalue_doesnt_exist" %]
[% title = "Specified Field Value Does Not Exist" %] [% title = "Specified Field Value Does Not Exist" %]
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
[% ELSIF error == "fieldvalue_is_default" %] [% ELSIF error == "fieldvalue_is_default" %]
[% title = "Specified Field Value Is Default" %] [% title = "Specified Field Value Is Default" %]
'[% value FILTER html %]' is the default value for '[% value FILTER html %]' is the default value for
the '[% field FILTER html %]' field and cannot be deleted. the '[% field.description FILTER html %]' field and cannot be deleted.
[% IF user.groups.tweakparams %] [% IF user.groups.tweakparams %]
You have to <a href="editparams.cgi?section=bugfields# You have to <a href="editparams.cgi?section=bugfields#
[%- param_name FILTER url_quote %]">change</a> the default value first. [%- param_name FILTER url_quote %]">change</a> the default value first.
...@@ -448,12 +448,12 @@ ...@@ -448,12 +448,12 @@
[% ELSIF error == "fieldvalue_not_editable" %] [% ELSIF error == "fieldvalue_not_editable" %]
[% title = "Field Value Not Editable" %] [% title = "Field Value Not Editable" %]
The value '[% old_value FILTER html %]' cannot be renamed because The value '[% old_value FILTER html %]' cannot be renamed because
it plays some special role for the '[% field FILTER html %]' field. it plays some special role for the '[% field.description FILTER html %]' field.
[% ELSIF error == "fieldvalue_not_deletable" %] [% ELSIF error == "fieldvalue_not_deletable" %]
[% title = "Field Value Not Deletable" %] [% title = "Field Value Not Deletable" %]
The value '[% value FILTER html %]' cannot be removed because The value '[% value FILTER html %]' cannot be removed because
it plays some special role for the '[% field FILTER html %]' field. it plays some special role for the '[% field.description FILTER html %]' field.
[% ELSIF error == "fieldvalue_not_specified" %] [% ELSIF error == "fieldvalue_not_specified" %]
[% title = "Field Value Not Specified" %] [% title = "Field Value Not Specified" %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment