diff options
-rw-r--r-- | extensions/REMO/Extension.pm | 5 | ||||
-rw-r--r-- | extensions/REMO/template/en/default/hook/global/user-error-errors.html.tmpl | 4 | ||||
-rw-r--r-- | extensions/REMO/web/js/moz_reps.js | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/extensions/REMO/Extension.pm b/extensions/REMO/Extension.pm index 1e99182e0..9f83f7065 100644 --- a/extensions/REMO/Extension.pm +++ b/extensions/REMO/Extension.pm @@ -318,11 +318,14 @@ sub post_bug_after_creation { status => '?', requestee => $_->login } } @cc_users; + ThrowUserError('remo_missing_voucher') unless @cc_users; $bug->set_flags(\@new_flags, []) if @new_flags; $bug->add_comment( join(", ", map { $_->name || $_->login } @cc_users) . - ": You have been added as supporter to this Reps application, please comment why do you endorse their application. Thanks!" + ": You have been added as a voucher to this Reps application.\n" . + "Please provide a comment describing why you endorse this application.\n" . + "Thanks!" ); $bug->update($bug->creation_ts); diff --git a/extensions/REMO/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/REMO/template/en/default/hook/global/user-error-errors.html.tmpl index 200e678be..e13fba024 100644 --- a/extensions/REMO/template/en/default/hook/global/user-error-errors.html.tmpl +++ b/extensions/REMO/template/en/default/hook/global/user-error-errors.html.tmpl @@ -37,4 +37,8 @@ You can either <a href="[% urlbase FILTER html %]page.cgi?id=remo-form-payment.html"> create a new payment request</a> or [% "go back to $terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]. +[% ELSIF error == "remo_missing_voucher" %] + [% title = "Missing Vouchers" %] + You did not provide anyone to vouch for your application. + [% END %] diff --git a/extensions/REMO/web/js/moz_reps.js b/extensions/REMO/web/js/moz_reps.js index 88c60df51..e269e4445 100644 --- a/extensions/REMO/web/js/moz_reps.js +++ b/extensions/REMO/web/js/moz_reps.js @@ -49,9 +49,10 @@ $(document).ready(function() { $('label.required').each(function (index) { var id = $(this).attr("for"); var input = $("#" + id); + var value = input.val().trim(); if (id == 'mozillian') { - if (!input.val().match(mozillian_re)) { + if (!value.match(mozillian_re)) { input.addClass("missing"); errors.push("The Mozillian Account URL is invalid"); event.preventDefault(); @@ -61,7 +62,7 @@ $(document).ready(function() { } } else { - if (input.val() == "") { + if (value == "") { input.addClass("missing"); missing = true; event.preventDefault(); |