From 695f10287d7244234e7f6185377dc27ee14b5317 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Mar 2020 19:13:35 +0000 Subject: [PATCH] Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice This follow-up makes minor changes to the template so that the checkbox for reopening or closing an invoice are not displayed when the user doens't have the correct permissions. To test, apply the patch and try the process of viewing or editing an invoice as a user with these various permissions: - edit_invoices ON - edit_invoices OFF - reopen_closed_invoices ON - reopen_closed_invoices OFF --- .../intranet-tmpl/prog/en/modules/acqui/invoice.tt | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 4dbf2a1c2dc..c77e51520ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -98,20 +98,23 @@
  • Status: Closed on [% invoiceclosedate | $KohaDates %]
  • -
  • - [% IF CAN_user_acquisition_reopen_closed_invoices AND NOT readonly %] - - [% ELSE %] - +
  • + + +
  • [% END %] - [% ELSE %] -
  • Status: - Open
  • - -
  • +
  • + Status: + Open +
  • + [% UNLESS ( readonly ) %] +
  • + +
  • + [% END %] [% END %] [% UNLESS readonly %] -- 2.11.0