diff options
author | mkanat%bugzilla.org <> | 2008-10-03 06:40:15 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-10-03 06:40:15 +0000 |
commit | a43231dd4ccef2b02fa0434217b637a6d1638c97 (patch) | |
tree | 5d5f7987c0216ca2d2fe931cd9b7cbc879a34502 /template/en/default/admin/fieldvalues/confirm-delete.html.tmpl | |
parent | b03fc56082401474044c7f92f8786164ca0508a4 (diff) | |
download | bugs-a43231dd4ccef2b02fa0434217b637a6d1638c97.tar bugs-a43231dd4ccef2b02fa0434217b637a6d1638c97.tar.gz bugs-a43231dd4ccef2b02fa0434217b637a6d1638c97.tar.bz2 bugs-a43231dd4ccef2b02fa0434217b637a6d1638c97.tar.xz bugs-a43231dd4ccef2b02fa0434217b637a6d1638c97.zip |
Bug 456922: Now that Bugzilla::Field::Choice is complete, clean up editvalues.cgi and error messages
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'template/en/default/admin/fieldvalues/confirm-delete.html.tmpl')
-rw-r--r-- | template/en/default/admin/fieldvalues/confirm-delete.html.tmpl | 83 |
1 files changed, 45 insertions, 38 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> |