Skip to content

Commit

Permalink
V8: Add irreversible warning when deleting items from the recycle bin (
Browse files Browse the repository at this point in the history
  • Loading branch information
kjac authored and nul800sebastiaan committed Oct 16, 2019
1 parent 82b8302 commit 6c6b23c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Umbraco.Web.UI.Client/src/views/content/delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
</p>

<div class="umb-alert umb-alert--warning" ng-show="hasMoreThanOneLanguage">
<div class="umb-alert umb-alert--warning" ng-show="hasMoreThanOneLanguage && !currentNode.trashed">
<localize key="defaultdialogs_variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.</localize>
</div>

<div class="umb-alert umb-alert--warning" ng-show="currentNode.trashed">
<localize key="defaultdialogs_recycleBinWarning">When items are deleted from the recycle bin, they will be gone forever</localize>.
</div>

<umb-confirm on-confirm="performDelete" confirm-button-style="danger" on-cancel="cancel"></umb-confirm>
</div>

Expand Down
6 changes: 5 additions & 1 deletion src/Umbraco.Web.UI.Client/src/views/media/delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
</p>

<umb-confirm on-confirm="performDelete" on-cancel="close"></umb-confirm>
<div class="umb-alert umb-alert--warning" ng-show="currentNode.trashed">
<localize key="defaultdialogs_recycleBinWarning">When items are deleted from the recycle bin, they will be gone forever</localize>.
</div>

<umb-confirm on-confirm="performDelete" on-cancel="close" confirm-button-style="danger"></umb-confirm>
</div>

</div>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Web/Trees/TreeControllerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public TreeNode CreateTreeNode(IEntitySlim entity, Guid entityObjectType, string
treeNode.Path = entity.Path;
treeNode.Udi = Udi.Create(ObjectTypes.GetUdiType(entityObjectType), entity.Key);
treeNode.HasChildren = hasChildren;
treeNode.Trashed = entity.Trashed;
return treeNode;
}

Expand Down

0 comments on commit 6c6b23c

Please sign in to comment.