summaryrefslogtreecommitdiffstats
path: root/extensions/BugmailFilter/template
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-09-03 08:06:29 +0200
committerByron Jones <glob@mozilla.com>2014-09-03 08:06:29 +0200
commite1e2ca422db2ad5c4a19c0901b6402d3a7f0b175 (patch)
tree1712ff552852b3c8c55e1d30d0374b2136afb148 /extensions/BugmailFilter/template
parentbd23fbfeccd49a406f6a8d99a21371ad7ade07ba (diff)
downloadbugzilla-e1e2ca422db2ad5c4a19c0901b6402d3a7f0b175.tar.gz
bugzilla-e1e2ca422db2ad5c4a19c0901b6402d3a7f0b175.tar.xz
Bug 1054138: add the ability to filter on "fields containing the string"
Diffstat (limited to 'extensions/BugmailFilter/template')
-rw-r--r--extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl14
-rw-r--r--extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl9
2 files changed, 20 insertions, 3 deletions
diff --git a/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl b/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
index 12c745adb..43d18f516 100644
--- a/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
+++ b/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
@@ -48,16 +48,24 @@ var cpts = new Array();
[% field.description FILTER html %]
</option>
[% END %]
+ <option value="~">Contains:</option>
</select>
</td>
<td class="blurb">
the field that was changed
</td>
</tr>
+<tr id="field_contains_row" class="bz_default_hidden">
+ <td>&nbsp;</td>
+ <td>
+ <input name="field_contains" id="field_contains"
+ placeholder="field name" maxlength="63">
+ </td>
+</tr>
<tr>
<th>Product:</th>
<td>
- <select name="product" id="product" onChange="onFilterProductChange()">
+ <select name="product" id="product">
<option value="">__Any__</option>
[% FOREACH product IN selectable_products %]
<option>[% product.name FILTER html %]</option>
@@ -139,11 +147,11 @@ var cpts = new Array();
<tr class="[% "row_odd" UNLESS loop.count % 2 %]">
<td>
<input type="checkbox" name="remove" value="[% filter.id FILTER none %]"
- onChange="onRemoveChange()">
+ onChange="onFilterRemoveChange()">
</td>
<td>[% filter.product ? filter.product.name : 'Any' FILTER html %]</td>
<td>[% filter.component ? filter.component.name : 'Any' FILTER html %]</td>
- <td>[% filter.field ? fields.${filter.field.name} || filter.field.description : 'Any' FILTER html %]</td>
+ <td>[% filter.field_description FILTER html %]</td>
<td>[% filter.relationship ? filter.relationship_name : 'Any' FILTER html %]</td>
<td>[% filter.action ? 'Exclude' : 'Include' %]</td>
</tr>
diff --git a/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl
index 380c07ee5..4be894c6f 100644
--- a/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl
+++ b/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl
@@ -10,4 +10,13 @@
[% title = "Filter Already Exists" %]
A filter already exists with the selected criteria.
+[% ELSIF error == "bugmail_filter_too_long" %]
+ [% title = "Invalid Field Name" %]
+ The field name to filter on is too long (must be 63 character or fewer).
+
+[% ELSIF error == "bugmail_filter_invalid" %]
+ [% title = "Invalid Field Name" %]
+ The field name contains invalid characters (alpha-numeric, underscore and
+ period only).
+
[% END %]