From 1fa816bd32a9d77d2d607b16151054b468ed3e48 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 8 Sep 2021 15:14:12 +0200 Subject: [PATCH] Show notification when a group can't be moved + reset requested tab --- .../directives/components/umbgroupsbuilder.directive.js | 7 ++++++- src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js index d4c8b3d300..68460f4982 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js @@ -143,6 +143,9 @@ const dropIndex = groupsInTab.findIndex(group => group.key === groupKey); updateSortOrder(groupsInTab, dropIndex); + + // when a group is dropped we need to reset the requested tab hover alias + scope.sortableRequestedTabAlias = undefined; } } }; @@ -192,7 +195,9 @@ const newAlias = contentTypeHelper.updateParentAlias(group.alias || null, hoveredTabAlias); // Check alias is unique if (group.alias !== newAlias && contentTypeHelper.isAliasUnique(scope.model.groups, newAlias) === false) { - // TODO: Missing UI indication of why you cant move here. + localizationService.localize("contentTypeEditor_groupReorderSameAliasError", [group.name, newAlias]).then((value) => { + notificationsService.error(value); + }); return; } } diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index ec2fd1245c..67982b0e94 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1670,6 +1670,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Compositions Group + You can't move the group %0% to this tab because the group will get the same alias as a tab: "%1%". Rename the group to continue. You have not added any groups Add group Inherited from