diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-15 15:53:37 -0800 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-15 15:53:37 -0800 |
commit | 013e70552d98fc3beb0d075108138a8b6afbacc7 (patch) | |
tree | 6cbf0420bd3cd05e825aced4c6d7e669b55241be | |
parent | 120b63d507a3316666b25494bc890a024948aef8 (diff) | |
download | bugs-013e70552d98fc3beb0d075108138a8b6afbacc7.tar bugs-013e70552d98fc3beb0d075108138a8b6afbacc7.tar.gz bugs-013e70552d98fc3beb0d075108138a8b6afbacc7.tar.bz2 bugs-013e70552d98fc3beb0d075108138a8b6afbacc7.tar.xz bugs-013e70552d98fc3beb0d075108138a8b6afbacc7.zip |
Move the no_open_bug_status code error into the Voting extension.
https://bugzilla.mozilla.org/show_bug.cgi?id=372979
-rw-r--r-- | extensions/Voting/Extension.pm | 2 | ||||
-rw-r--r-- | extensions/Voting/template/en/default/hook/global/code-error-errors.html.tmpl | 24 | ||||
-rw-r--r-- | template/en/default/global/code-error.html.tmpl | 5 |
3 files changed, 25 insertions, 6 deletions
diff --git a/extensions/Voting/Extension.pm b/extensions/Voting/Extension.pm index e111ac785..6857135eb 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -836,7 +836,7 @@ sub _confirm_if_vote_confirmed { last; } } - ThrowCodeError('no_open_bug_status') unless $new_status; + ThrowCodeError('voting_no_open_bug_status') unless $new_status; # We cannot call $bug->set_status() here, because a user without # canconfirm privs should still be able to confirm a bug by diff --git a/extensions/Voting/template/en/default/hook/global/code-error-errors.html.tmpl b/extensions/Voting/template/en/default/hook/global/code-error-errors.html.tmpl new file mode 100644 index 000000000..719cbe4c1 --- /dev/null +++ b/extensions/Voting/template/en/default/hook/global/code-error-errors.html.tmpl @@ -0,0 +1,24 @@ +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Everything Solved, Inc. + # Portions created by the Initial Developer are Copyright (C) 2010 + # the Initial Developer. All Rights Reserved. + # + # Contributor(s): + # Max Kanat-Alexander <mkanat@bugzilla.org> + #%] + +[% IF error == "voting_no_open_bug_status" %] + [% title = "$terms.Bug Cannot Be Confirmed" %] + There is no valid transition from + [%+ display_value("bug_status", "UNCONFIRMED") FILTER html %] to an open state diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index b8a87fb58..483aec58a 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -374,11 +374,6 @@ You cannot set the resolution of [% terms.abug %] to [% display_value("resolution", "MOVED") FILTER html %] without moving the [% terms.bug %]. - [% ELSIF error == "no_open_bug_status" %] - [% title = "$terms.Bug Cannot Be Confirmed" %] - There is no valid transition from - [%+ display_value("bug_status", "UNCONFIRMED") FILTER html %] to an open state. - [% ELSIF error == "param_invalid" %] [% title = "Invalid Parameter" %] <code>[% param FILTER html %]</code> is not a valid parameter |