summaryrefslogtreecommitdiffstats
path: root/extensions/ComponentWatching
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ComponentWatching')
-rw-r--r--extensions/ComponentWatching/Extension.pm4
-rw-r--r--extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl4
2 files changed, 7 insertions, 1 deletions
diff --git a/extensions/ComponentWatching/Extension.pm b/extensions/ComponentWatching/Extension.pm
index db191dfbe..2b583ee4e 100644
--- a/extensions/ComponentWatching/Extension.pm
+++ b/extensions/ComponentWatching/Extension.pm
@@ -160,7 +160,9 @@ sub _check_watch_user {
my ($self, $value, $field) = @_;
$value = trim($value || '');
- return if $value eq '';
+ if ($value eq '') {
+ ThrowUserError('component_watch_missing_watch_user');
+ }
if ($value !~ /\.bugs$/i) {
ThrowUserError('component_watch_invalid_watch_user');
}
diff --git a/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl
index 8da2f2790..01dbb5114 100644
--- a/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl
+++ b/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl
@@ -10,4 +10,8 @@
[% title = "Invalid Watch User" %]
The "Watch User" must be a <b>.bugs</b> email address.<br>
For example: <i>accessibility-apis@core.bugs</i>
+[% ELSIF error == "component_watch_missing_watch_user" %]
+ [% title = "Missing Watch User" %]
+ You must provide a <b>.bugs</b> email address for the "Watch User".<br>
+ For example: <i>accessibility-apis@core.bugs</i>
[% END %]