From 6638e9de8c405e119a3816516a3340e84f5d8793 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 Signed-off-by: Alex Arnaud Signed-off-by: Jonathan Druart --- .../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 f710d384a0..c6f9fe2047 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.39.5