From 0677733f0afbf6e4b5b414e8ae928dea34bff893 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 22 May 2015 13:33:40 +0800 Subject: Bug 1135164: display a warning on show_bug when an unassigned bug has a patch attached --- .../en/default/hook/attachment/list-warnings.html.tmpl | 18 ++++++++++++++++++ .../hook/bug_modal/attachments-warnings.html.tmpl | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl create mode 100644 extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl (limited to 'extensions/BMO/template/en/default/hook') diff --git a/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl b/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl new file mode 100644 index 000000000..11998e12f --- /dev/null +++ b/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl @@ -0,0 +1,18 @@ +[%# This Source Code Form is subject to the 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. + #%] + +[% + RETURN UNLESS user.in_group('editbugs'); + RETURN UNLESS bug.attachments.size && bug.is_unassigned && bug.has_patch; +%] + + + + Unassigned [% terms.bug %] with patches attached + + diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl new file mode 100644 index 000000000..ca2a5a58c --- /dev/null +++ b/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl @@ -0,0 +1,16 @@ +[%# This Source Code Form is subject to the 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. + #%] + +[% + RETURN UNLESS user.in_group('editbugs'); + RETURN UNLESS bug.attachments.size && bug.is_unassigned && bug.has_patch; +%] +
+ + Unassigned [% terms.bug %] with patches attached +
-- cgit v1.2.3-24-g4f1b