summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BMO/template')
-rw-r--r--extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl (renamed from extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl)15
2 files changed, 12 insertions, 4 deletions
diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl
index 67ab62f5a..97d255b0b 100644
--- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl
@@ -8,7 +8,6 @@
[%
RETURN UNLESS attachment.is_bounty_attachment;
- has_bounty_attachment = 1;
attachment_rendered = 1;
bounty = attachment.bounty_details;
%]
diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl
index 97d0ed739..03c7d2e49 100644
--- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl
@@ -6,8 +6,17 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% RETURN IF !user.in_group("bounty-team") || has_bounty_attachment %]
+[%
+ RETURN IF !user.in_group("bounty-team");
+ has_bounty_attachment = 0;
+ FOREACH attachment IN bug.attachments;
+ IF attachment.is_bounty_attachment;
+ has_bounty_attachment = 1;
+ LAST;
+ END;
+ END;
+%]
<button type="button" class="minor"
- onclick="document.location='page.cgi?id=attachment_bounty_form.html&bug_id=[% bug.id FILTER none %]'">
- Add Bounty Tracking Attachment
+ onclick="document.location='page.cgi?id=attachment_bounty_form.html&amp;bug_id=[% bug.id FILTER none %]'">
+ [% has_bounty_attachment ? "Edit" : "Add" %] Bounty Tracking Attachment
</button>