Using display name in notification when adding fields

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-01-26 15:38:22 -08:00
parent 312fe11b80
commit 264a5521c6
2 changed files with 3 additions and 3 deletions

View File

@@ -432,12 +432,12 @@ namespace Orchard.ContentTypes.Controllers {
_contentDefinitionService.AddFieldToPart(viewModel.Name, viewModel.DisplayName, viewModel.FieldTypeName, partViewModel.Name);
}
catch (Exception ex) {
Services.Notifier.Information(T("The \"{0}\" field was not added. {1}", viewModel.Name, ex.Message));
Services.Notifier.Information(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message));
Services.TransactionManager.Cancel();
return AddFieldTo(id);
}
Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.Name));
Services.Notifier.Information(T("The \"{0}\" field has been added.", viewModel.DisplayName));
if (typeViewModel != null) {
return RedirectToAction("Edit", new {id});