Updated ClientValidationRegistrationCoordinator with updated interface.

This commit is contained in:
Sipke Schoorstra
2015-11-12 19:10:03 +01:00
parent 6ff17439e8
commit 92fba4d76d
4 changed files with 12 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Linq;
using Orchard.DynamicForms.Elements;
using Orchard.DynamicForms.Services;
@@ -54,5 +55,11 @@ namespace Orchard.DynamicForms.Handlers {
void IElementEventHandler.BuildEditor(ElementEditorContext context) { }
void IElementEventHandler.UpdateEditor(ElementEditorContext context) { }
void IElementEventHandler.Removing(ElementRemovingContext context) { }
void IElementEventHandler.LayoutSaving(ElementSavingContext context) { }
void IElementEventHandler.Exporting(ExportElementContext context) { }
void IElementEventHandler.Exported(ExportElementContext context) { }
void IElementEventHandler.Importing(ImportElementContext context) { }
void IElementEventHandler.Imported(ImportElementContext context) { }
void IElementEventHandler.ImportCompleted(ImportElementContext context) { }
}
}

View File

@@ -1,10 +1,11 @@
namespace Orchard.Layouts.Framework.Elements {
public class ElementSavingContext : LayoutSavingContext {
public ElementSavingContext(LayoutSavingContext stub) {
public ElementSavingContext(Element element, LayoutSavingContext stub) {
Element = element;
Content = stub.Content;
Updater = stub.Updater;
Elements = stub.Elements;
}
public Element Element { get; set; }
public Element Element { get; private set; }
}
}

View File

@@ -143,7 +143,7 @@ namespace Orchard.Layouts.Services {
var elements = context.Elements.Flatten();
foreach (var element in elements) {
var savingContext = new ElementSavingContext(context);
var savingContext = new ElementSavingContext(element, context);
_elementEventHandler.LayoutSaving(savingContext);
element.Descriptor.LayoutSaving(savingContext);
}

View File

@@ -7,7 +7,7 @@
}
@if (widgets.Count() > 0) {
<div id="widgets-orphans" class="widgets-container widgets-listed message-Warning">
<h3>@T("Widgets with problems.")</h3>
<h3>@T("Widgets with problems")</h3>
<p>@T("These widgets aren't going to appear anywhere because they're missing the CommonPart from their content type. To fix these widgets, if you still want to keep them around, start by fixing their <a href=\"{0}\">Content Types</a>.", Url.Action("Index", "Admin", new { area = "Orchard.ContentTypes" }))</p>
<ul>
@foreach (WidgetPart widget in widgets) {