mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-24 01:49:12 +08:00

committed by
Sébastien Ros

parent
024eaff854
commit
baac878337
@@ -39,6 +39,7 @@ namespace Orchard.Taxonomies.Handlers {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
base.UpdateEditorShape(context);
|
base.UpdateEditorShape(context);
|
||||||
|
if(context.Updater.TryUpdateModel(part, "Term", null, null)) {
|
||||||
var existing = _taxonomyService.GetTermByName(part.TaxonomyId, part.Name);
|
var existing = _taxonomyService.GetTermByName(part.TaxonomyId, part.Name);
|
||||||
if (existing != null && existing.Record != part.Record && existing.Container.ContentItem.Record == part.Container.ContentItem.Record) {
|
if (existing != null && existing.Record != part.Record && existing.Container.ContentItem.Record == part.Container.ContentItem.Record) {
|
||||||
context.Updater.AddModelError("Name", T("The term {0} already exists at this level", part.Name));
|
context.Updater.AddModelError("Name", T("The term {0} already exists at this level", part.Name));
|
||||||
@@ -46,3 +47,4 @@ namespace Orchard.Taxonomies.Handlers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user