-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#48 - add content containing form to event args
- Loading branch information
Kenn Jacobsen
committed
Aug 1, 2016
1 parent
c08e562
commit ac3d595
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
13 changes: 10 additions & 3 deletions
13
Source/Solution/FormEditor/Events/FormEditorCancelEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using FormEditor.Fields; | ||
using System.ComponentModel; | ||
using Umbraco.Core.Models; | ||
|
||
namespace FormEditor.Events | ||
{ | ||
public class FormEditorCancelEventArgs : CancelEventArgs | ||
{ | ||
public FormEditorCancelEventArgs(IPublishedContent content) | ||
{ | ||
Content = content; | ||
} | ||
|
||
// if Cancel is set to true, use this property to describe the error to the user | ||
public string ErrorMessage { get; set; } | ||
|
||
// the content that contains the form | ||
public IPublishedContent Content { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
using System; | ||
using Umbraco.Core.Models; | ||
|
||
namespace FormEditor.Events | ||
{ | ||
public class FormEditorEventArgs : EventArgs | ||
{ | ||
public FormEditorEventArgs(Guid rowId) | ||
public FormEditorEventArgs(Guid rowId, IPublishedContent content) | ||
{ | ||
RowId = rowId; | ||
Content = content; | ||
} | ||
|
||
// the ID of the persisted data in the storage index | ||
public Guid RowId { get; private set; } | ||
|
||
// the content that contains the form | ||
public IPublishedContent Content { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters