diff --git a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor
index 624afb0..6edc5af 100644
--- a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor
+++ b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor
@@ -1,6 +1,7 @@
@using Oqtane.Modules.Controls
@using SZUAbsolventenverein.Module.EventRegistration.Services
@using SZUAbsolventenverein.Module.EventRegistration.Models
+@using Microsoft.AspNetCore.Components.Forms
@namespace SZUAbsolventenverein.Module.EventRegistration
@inherits ModuleBase
@@ -17,22 +18,21 @@
-
-
-
-
-
+
+
+
@@ -56,13 +56,15 @@
new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css" }
};
+
+ private RichTextEditor RichTextEditorHtml;
private ElementReference form;
private bool validated = false;
private int _id;
private string _name;
private string _description;
- private DateTime _eventDate;
+ private DateTime _eventDate = DateTime.Now;
private string _location;
private string _createdby;
@@ -105,6 +107,10 @@
{
validated = true;
var interop = new Oqtane.UI.Interop(JSRuntime);
+
+ string content = await RichTextEditorHtml.GetHtml();
+ content = Utilities.FormatContent(content, PageState.Alias, "save");
+
if (await interop.FormValid(form))
{
if (PageState.Action == "Add")
@@ -112,7 +118,7 @@
Event EventRegistration = new Event();
EventRegistration.ModuleId = ModuleState.ModuleId;
EventRegistration.Name = _name;
- EventRegistration.Description = _description;
+ EventRegistration.Description = content;
EventRegistration.EventDate = _eventDate.ToUniversalTime();
EventRegistration.Location = _location;
EventRegistration = await EventRegistrationService.AddEventAsync(EventRegistration);
@@ -122,7 +128,7 @@
{
Event EventRegistration = await EventRegistrationService.GetEventAsync(_id, ModuleState.ModuleId);
EventRegistration.Name = _name;
- EventRegistration.Description = _description;
+ EventRegistration.Description = content;
EventRegistration.EventDate = _eventDate.ToUniversalTime();
EventRegistration.Location = _location;
await EventRegistrationService.UpdateEventAsync(EventRegistration);