[%# 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') || bug.assigned_to.id == user.id;
  RETURN UNLESS bug.attachments.size && bug.has_current_patch;
%]

[% IF bug.is_unassigned %]
  <tr class="bz_attach_footer">
    <td colspan="[% show_attachment_flags ? 3 : 2 %]" class="attachment-warning">
      <img src="[% basepath FILTER none %]extensions/BMO/web/images/sign_warning.png" width="16" height="16">
      Unassigned [% terms.bug %] with patches attached
    </td>
  </tr>
[% END %]

[% IF bug.missing_sec_approval %]
  <tr class="bz_attach_footer">
    <td colspan="[% show_attachment_flags ? 3 : 2 %]" id="sec-approval-warning" class="attachment-warning">
      <img src="[% basepath FILTER none %]extensions/BMO/web/images/sign_warning.png" width="16" height="16">
      <a href="https://firefox-source-docs.mozilla.org/bug-mgmt/processes/security-approval.html"
         target="_blank" rel="noopener noreferrer">
        sec-approval required on patches before landing
      </a>
    </td>
  </tr>
[% END %]
