Show notification when a group can't be moved + reset requested tab

This commit is contained in:
Mads Rasmussen
2021-09-08 15:14:12 +02:00
parent 05d0a29e03
commit 1fa816bd32
2 changed files with 7 additions and 1 deletions

View File

@@ -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;
}
}

View File

@@ -1670,6 +1670,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<area alias="contentTypeEditor">
<key alias="compositions">Compositions</key>
<key alias="group">Group</key>
<key alias="groupReorderSameAliasError">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.</key>
<key alias="noGroups">You have not added any groups</key>
<key alias="addGroup">Add group</key>
<key alias="inheritedFrom">Inherited from</key>