From 8f77358eaedb89041ea95940d46fa9fb5d1fe949 Mon Sep 17 00:00:00 2001 From: Sunil Joshi Date: Fri, 14 Dec 2012 15:55:23 +0100 Subject: Bug 780675: Display "The changes to your votes have been saved" in green instead of red r/a=LpSolit --- extensions/Voting/Extension.pm | 2 +- .../en/default/hook/global/messages-messages.html.tmpl | 16 ++++++++++++++++ .../template/en/default/pages/voting/user.html.tmpl | 10 ---------- 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 extensions/Voting/template/en/default/hook/global/messages-messages.html.tmpl (limited to 'extensions/Voting') diff --git a/extensions/Voting/Extension.pm b/extensions/Voting/Extension.pm index 03397eaf4..981751a34 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -628,7 +628,7 @@ sub _update_votes { # Set header_done to 1 only after the first bug. $vars->{'header_done'} = 1; } - $vars->{'votes_recorded'} = 1; + $vars->{'message'} = 'votes_recorded'; } ###################### diff --git a/extensions/Voting/template/en/default/hook/global/messages-messages.html.tmpl b/extensions/Voting/template/en/default/hook/global/messages-messages.html.tmpl new file mode 100644 index 000000000..74a2d937a --- /dev/null +++ b/extensions/Voting/template/en/default/hook/global/messages-messages.html.tmpl @@ -0,0 +1,16 @@ +[%# This Source Code Form is subject to th e terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# This is a list of all the possible messages. Please keep them in + # alphabetical order by message tag, and leave a blank line between messages. + #%] + +[% IF message_tag == "votes_recorded" %] + The changes to your votes have been saved. +[% END %] + diff --git a/extensions/Voting/template/en/default/pages/voting/user.html.tmpl b/extensions/Voting/template/en/default/pages/voting/user.html.tmpl index 6705b9c37..b1cf53a85 100644 --- a/extensions/Voting/template/en/default/pages/voting/user.html.tmpl +++ b/extensions/Voting/template/en/default/pages/voting/user.html.tmpl @@ -47,16 +47,6 @@
[% END %] -[% IF votes_recorded %] -

- - The changes to your votes have been saved. - -

-[% ELSE %] -
-[% END %] - [% IF products.size %]
-- cgit v1.2.3-24-g4f1b