From 943ecbf91fa6914e383b58f4817b57a1fc939fae Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Mon, 21 Aug 2017 11:40:22 +0200 Subject: [PATCH] Bug 7317: Only allow cancellation request when status is new. * Koha/Illrequest.pm (_core_status_graph): Update status graph. * koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt: Only show button when status is NEW. --- Koha/Illrequest.pm | 12 ++++++------ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 526172d52b..d91be8e5b1 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -231,12 +231,12 @@ sub _core_status_graph { ui_method_icon => 'fa-plus', # UI Style class }, REQ => { - prev_actions => [ 'NEW', 'REQREV', 'QUEUED' ], + prev_actions => [ 'NEW', 'REQREV', 'QUEUED', 'CANCREQ' ], id => 'REQ', name => 'Requested', ui_method_name => 'Confirm request', method => 'confirm', - next_actions => [ 'REQREV', 'CANCREQ', 'COMP' ], + next_actions => [ 'REQREV', 'COMP' ], ui_method_icon => 'fa-check', }, GENREQ => { @@ -249,7 +249,7 @@ sub _core_status_graph { ui_method_icon => 'fa-send-o', }, REQREV => { - prev_actions => [ 'CANCREQ', 'REQ' ], + prev_actions => [ 'REQ' ], id => 'REQREV', name => 'Request reverted', ui_method_name => 'Revert Request', @@ -267,12 +267,12 @@ sub _core_status_graph { ui_method_icon => 0, }, CANCREQ => { - prev_actions => [ 'REQ' ], + prev_actions => [ 'NEW' ], id => 'CANCREQ', name => 'Cancellation requested', ui_method_name => 0, method => 0, - next_actions => [ 'REQREV' ], + next_actions => [ 'KILL', 'REQ' ], ui_method_icon => 0, }, COMP => { @@ -285,7 +285,7 @@ sub _core_status_graph { ui_method_icon => 'fa-check', }, KILL => { - prev_actions => [ 'QUEUED', 'REQREV', 'NEW' ], + prev_actions => [ 'QUEUED', 'REQREV', 'NEW', 'CANCREQ' ], id => 'KILL', name => 0, ui_method_name => 'Delete request', diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt index 14f9cbd25f..e0448c18c1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -183,7 +183,7 @@ [% IF !request.completed %] - [% IF request.status != "CANCREQ" %] + [% IF request.status == "NEW" %] Request cancellation [% END %] -- 2.11.0