Fixes build errors after merge
This commit is contained in:
24
src/Umbraco.Web/Editors/Binders/BlueprintItemBinder.cs
Normal file
24
src/Umbraco.Web/Editors/Binders/BlueprintItemBinder.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.Editors.Binders
|
||||
{
|
||||
internal class BlueprintItemBinder : ContentItemBinder
|
||||
{
|
||||
public BlueprintItemBinder()
|
||||
{
|
||||
}
|
||||
|
||||
public BlueprintItemBinder(ILogger logger, ServiceContext services, IUmbracoContextAccessor umbracoContextAccessor)
|
||||
: base(logger, services, umbracoContextAccessor)
|
||||
{
|
||||
}
|
||||
|
||||
protected override IContent GetExisting(ContentItemSave model)
|
||||
{
|
||||
return Services.ContentService.GetBlueprintById(model.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Editors;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Editors.Filters;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Models.Mapping;
|
||||
using Umbraco.Web.WebApi;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
namespace Umbraco.Web.Editors.Binders
|
||||
{
|
||||
@@ -26,7 +18,6 @@ namespace Umbraco.Web.Editors.Binders
|
||||
/// </summary>
|
||||
internal class ContentItemBinder : IModelBinder
|
||||
{
|
||||
private readonly ServiceContext _services;
|
||||
private readonly ContentModelBinderHelper _modelBinderHelper;
|
||||
|
||||
public ContentItemBinder() : this(Current.Logger, Current.Services, Current.UmbracoContextAccessor)
|
||||
@@ -35,10 +26,12 @@ namespace Umbraco.Web.Editors.Binders
|
||||
|
||||
public ContentItemBinder(ILogger logger, ServiceContext services, IUmbracoContextAccessor umbracoContextAccessor)
|
||||
{
|
||||
_services = services;
|
||||
Services = services;
|
||||
_modelBinderHelper = new ContentModelBinderHelper();
|
||||
}
|
||||
|
||||
protected ServiceContext Services { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates the model from the request and binds it to the context
|
||||
/// </summary>
|
||||
@@ -78,14 +71,14 @@ namespace Umbraco.Web.Editors.Binders
|
||||
return true;
|
||||
}
|
||||
|
||||
private IContent GetExisting(ContentItemSave model)
|
||||
protected virtual IContent GetExisting(ContentItemSave model)
|
||||
{
|
||||
return _services.ContentService.GetById(model.Id);
|
||||
return Services.ContentService.GetById(model.Id);
|
||||
}
|
||||
|
||||
private IContent CreateNew(ContentItemSave model)
|
||||
{
|
||||
var contentType = _services.ContentTypeService.Get(model.ContentTypeAlias);
|
||||
var contentType = Services.ContentTypeService.Get(model.ContentTypeAlias);
|
||||
if (contentType == null)
|
||||
{
|
||||
throw new InvalidOperationException("No content type found with alias " + model.ContentTypeAlias);
|
||||
|
||||
@@ -5,7 +5,7 @@ using Umbraco.Core.PropertyEditors.Validators;
|
||||
|
||||
namespace Umbraco.Web.PropertyEditors
|
||||
{
|
||||
[DataEditor(Constants.PropertyEditors.Aliases.EmailAddress, "Email address", "email", IsParameterEditor = true, Icon="icon-message")]
|
||||
[DataEditor(Constants.PropertyEditors.Aliases.EmailAddress, EditorType.PropertyValue | EditorType.MacroParameter, "Email address", "email", Icon="icon-message")]
|
||||
public class EmailAddressPropertyEditor : DataEditor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,5 +9,8 @@ namespace Umbraco.Web.PropertyEditors
|
||||
{
|
||||
[ConfigurationField("default", "Default Value", "boolean")]
|
||||
public string Default { get; set; } // fixme - well, true or false?!
|
||||
|
||||
[ConfigurationField("labelOn", "Write a label text", "textstring")]
|
||||
public string Label { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,15 +20,5 @@ namespace Umbraco.Web.PropertyEditors
|
||||
/// <inheritdoc />
|
||||
protected override IConfigurationEditor CreateConfigurationEditor() => new TrueFalseConfigurationEditor();
|
||||
|
||||
public TrueFalsePreValueEditor()
|
||||
{
|
||||
Fields.Add(new PreValueField()
|
||||
{
|
||||
Description = "Write a label text",
|
||||
Key = "labelOn",
|
||||
Name = "Label",
|
||||
View = "textstring"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
<Compile Include="Security\SessionIdValidator.cs" />
|
||||
<Compile Include="Trees\LegacyTreeDataConverter.cs" />
|
||||
<Compile Include="UI\JavaScript\ClientDependencyConfiguration.cs" />
|
||||
<Compile Include="Editors\Binders\BlueprintItemBinder.cs" />
|
||||
<Compile Include="WebApi\HttpActionContextExtensions.cs" />
|
||||
<Compile Include="Models\ContentEditing\IContentSave.cs" />
|
||||
<Compile Include="WebApi\TrimModelBinder.cs" />
|
||||
@@ -200,7 +201,6 @@
|
||||
<Compile Include="Editors\PreviewController.cs" />
|
||||
<Compile Include="Editors\TemplateController.cs" />
|
||||
<Compile Include="Editors\TourController.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DataIntegrity\DatabaseSchemaValidationHealthCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\Security\XssProtectionCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\Security\HstsCheck.cs" />
|
||||
<Compile Include="Editors\UserEditorAuthorizationHelper.cs" />
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.WebApi.Binders
|
||||
{
|
||||
internal class BlueprintItemBinder : ContentItemBinder
|
||||
{
|
||||
public BlueprintItemBinder(ApplicationContext applicationContext)
|
||||
: base(applicationContext)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public BlueprintItemBinder()
|
||||
: this(ApplicationContext.Current)
|
||||
{
|
||||
}
|
||||
|
||||
protected override IContent GetExisting(ContentItemSave model)
|
||||
{
|
||||
return ApplicationContext.Services.ContentService.GetBlueprintById(Convert.ToInt32(model.Id));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -417,7 +417,7 @@ namespace umbraco.presentation.umbraco.dialogs
|
||||
|
||||
var content = Services.ContentService.GetById(pageId);
|
||||
var text = content == null ? "" : content.Name;
|
||||
feedback.Text = Services.TextService.Localize("publicAccess/paIsProtected", new[] { text });
|
||||
feedback_text.Text = Services.TextService.Localize("publicAccess/paIsProtected", new[] { text });
|
||||
|
||||
p_setup.Visible = false;
|
||||
p_feedback.Visible = true;
|
||||
|
||||
Reference in New Issue
Block a user