summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/admin/fieldvalues/confirm-delete.html.tmpl')
-rw-r--r--template/en/default/admin/fieldvalues/confirm-delete.html.tmpl80
1 files changed, 46 insertions, 34 deletions
diff --git a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
index d1a016d8d..31deb547f 100644
--- a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
+++ b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
@@ -20,6 +20,8 @@
# value_count: number; The number of values left for this field, including
# this value.
# field: string; The name of the field.
+ # param_name: string; The name of the parameter (defaultxxx) associated
+ # with the field.
#%]
[% title = BLOCK %]Delete Value '[% value FILTER html %]' from the
@@ -27,6 +29,7 @@
[% PROCESS global/header.html.tmpl
title = title
+ style_urls = ['skins/standard/admin.css']
%]
<table border="1" cellpadding="4" cellspacing="0">
@@ -57,49 +60,58 @@
</table>
<h2>Confirmation</h2>
-
-[% IF bug_count %]
- Sorry, there
+[% IF (Param(param_name) == value) || bug_count || (value_count == 1) %]
- [% IF bug_count > 1 %]
- are [% bug_count FILTER html %] [%+ terms.bugs %]
- [% ELSE %]
- is [% bug_count FILTER html %] [%+ terms.bug %]
- [% END %]
+ <p>Sorry, but the '[% value FILTER html %]' value cannot be deleted
+ from the '[% field FILTER html %]' field for the following reason(s):</p>
- that still have this field value. You must change the field value on
- <a title="List of [% terms.bugs %] where '[% field FILTER html %]' is '[% value FILTER html %]'"
- href="buglist.cgi?[% field FILTER url_quote %]=[%- value FILTER url_quote %]">
- [% IF bug_count > 1 %]
- those [% terms.bugs %]
- [% ELSE %]
- that [% terms.bug %]
+ <ul class="warningmessages">
+ [% IF Param(param_name) == value %]
+ <li>'[% value FILTER html %]' is the default value for
+ the '[% field FILTER html %]' field.
+ [% IF user.groups.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 %]
[% END %]
- </a>
- to another value before you can delete this value.
-
-[% END %]
-[% IF value_count == 1 %]
-
- <p>Sorry, but '[% value FILTER html %]' is the last value for
- '[%- field FILTER html %]', and so it can not be deleted.</p>
+ [% 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 FILTER html %]' is '[% value FILTER html %]'"
+ href="buglist.cgi?[% field FILTER url_quote %]=[% value FILTER url_quote %]">
+ [% IF bug_count > 1 %]
+ those [% terms.bugs %]
+ [% ELSE %]
+ that [% terms.bug %]
+ [% END %]
+ </a>
+ to another value before you can delete this value.
+ [% END %]
- [% ELSE %]
+ [% IF value_count == 1 %]
+ <li>'[% value FILTER html %]' is the last value for
+ '[%- field FILTER html %]', and so it can not be deleted.
+ [% END %]
+ </ul>
- [% IF bug_count == 0 %]
+[% ELSE %]
- <p>Do you really want to delete this value?<p>
-
- <form method="post" action="editvalues.cgi">
- <input type="submit" value="Yes, delete">
- <input type="hidden" name="action" value="delete">
- <input type="hidden" name="field" value="[% field FILTER html %]">
- <input type="hidden" name="value" value="[% value FILTER html %]">
- </form>
+ <p>Do you really want to delete this value?</p>
- [% END %]
+ <form method="post" action="editvalues.cgi">
+ <input type="submit" value="Yes, delete">
+ <input type="hidden" name="action" value="delete">
+ <input type="hidden" name="field" value="[% field FILTER html %]">
+ <input type="hidden" name="value" value="[% value FILTER html %]">
+ </form>
[% END %]