summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl1
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl1
4 files changed, 13 insertions, 5 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>
diff --git a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
index 8e04392d8..e5fd7a82c 100644
--- a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
@@ -79,5 +79,4 @@
[% IF obsolete_attachments %]
<button type="button" id="attachments-obsolete-btn" class="minor">Show Obsolete Attachments</button>
[% END %]
- [% Hook.process('actions') %]
</div>
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index 6649399e1..da7f2f294 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -936,6 +936,7 @@
<div id="top-actions">
<button type="button" id="attachments-add-btn" class="minor">Attach File</button>
<button type="button" class="comment-btn minor">Add Comment</button>
+ [%+ Hook.process('top_actions') %]
<button type="submit" class="save-btn major" id="top-save-btn" style="display:none">Save Changes</button>
</div>
[% END %]