From 12edaf3c7f447a750271b9b3303f9fc6db544cb2 Mon Sep 17 00:00:00 2001 From: Joshua Rodriguez Date: Mon, 16 Dec 2024 17:14:50 -0800 Subject: [PATCH] Fix issue where History and SubProcs buttons on Processes page were clickable when the process was otherwise pending or disabled. --- install/cws-ui/processes.ftl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install/cws-ui/processes.ftl b/install/cws-ui/processes.ftl index 24055108..2ed1a510 100644 --- a/install/cws-ui/processes.ftl +++ b/install/cws-ui/processes.ftl @@ -328,18 +328,20 @@ orderable: false }, { - data: "procInstId", + data: { procInstId: "procInstId", status: "status" }, defaultContent: '', className: 'details-control', orderable: false, render: function (data, type) { if (type === 'display') { - if (data == null) { - return '' + - ""; + var isDisabled = (data.status === 'pending' || data.status === 'disabled'); + + if (data == null || isDisabled) { + return '' + + ""; } - return '' + - ""; + return '' + + ""; } return data; }