Starts fixing up the doc type folders stuff, fixes permissions settings on the trees, adds error messaging for duplicating folders, removes the click handler for folder nodes
This commit is contained in:
@@ -11,6 +11,7 @@ using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Microsoft.Owin;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
@@ -107,6 +108,22 @@ namespace Umbraco.Web.WebApi
|
||||
return msg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an error response with notifications in the result to be displayed in the UI
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="errorMessage"></param>
|
||||
/// <returns></returns>
|
||||
public static HttpResponseMessage CreateNotificationValidationErrorResponse(this HttpRequestMessage request, string errorMessage)
|
||||
{
|
||||
var notificationModel = new SimpleNotificationModel
|
||||
{
|
||||
Message = errorMessage
|
||||
};
|
||||
notificationModel.AddErrorNotification(errorMessage, string.Empty);
|
||||
return request.CreateValidationErrorResponse(notificationModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a 400 response message indicating that a validation error occurred
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user