diff --git a/core/Controllers/WorkflowController.cs b/core/Controllers/WorkflowController.cs index ab7cf0b4..c7d8a59c 100644 --- a/core/Controllers/WorkflowController.cs +++ b/core/Controllers/WorkflowController.cs @@ -146,7 +146,7 @@ public async Task Complete(Guid contentId,string variant,string s try { var existingItems = repo.GetPuckWorkflowItem().Where(x => x.ContentId == contentId && x.Variant == variant && !x.Complete).ToList(); - existingItems.ForEach(x => { x.Complete = true; x.CompleteDate = DateTime.Now;}); + existingItems.ForEach(x => { x.Complete = true; x.CompleteDate = DateTime.Now;x.LockedBy = string.Empty;x.LockedUntil = null; }); repo.SaveChanges(); diff --git a/puckweb/Areas/puck/Views/Workflow/Index.cshtml b/puckweb/Areas/puck/Views/Workflow/Index.cshtml index c213e2ac..0a3dc9d7 100644 --- a/puckweb/Areas/puck/Views/Workflow/Index.cshtml +++ b/puckweb/Areas/puck/Views/Workflow/Index.cshtml @@ -27,7 +27,7 @@ {
Locked by - @assignedItem.LockedBy
} -

@assignedItem.Message

+

@Html.Raw(assignedItem.Message)

View @if (!(!string.IsNullOrEmpty(assignedItem.LockedBy) && assignedItem.LockedUntil.HasValue && assignedItem.LockedUntil > DateTime.Now)) { @@ -52,7 +52,7 @@ {
Locked by - @groupedItem.LockedBy
} -

@groupedItem.Message

+

@Html.Raw(groupedItem.Message)

View @if (!(!string.IsNullOrEmpty(groupedItem.LockedBy) && groupedItem.LockedUntil.HasValue && groupedItem.LockedUntil > DateTime.Now)) { diff --git a/puckweb/wwwroot/Areas/puck/assets/js/puck.actions.js b/puckweb/wwwroot/Areas/puck/assets/js/puck.actions.js index c937e63d..4f4d3a81 100644 --- a/puckweb/wwwroot/Areas/puck/assets/js/puck.actions.js +++ b/puckweb/wwwroot/Areas/puck/assets/js/puck.actions.js @@ -1283,7 +1283,7 @@ var displayMarkup = function (parentId, type, variant, fromVariant,contentId,con var workflowItem = workflowItems[id + variant]; var startingState = formDatas[id + variant]; var currentState = fd; - + if (!workflowComments[id + variant] && wfo.comment && isFunction(wfo.comment)) { var commentDialogTitle = wfo.comment(workflowItem, userObject, startingState, currentState); if (commentDialogTitle && typeof commentDialogTitle=="string") {