From 026e00c5f26e8807d78225d0bf5ffd9695a7d103 Mon Sep 17 00:00:00 2001 From: EngincanV Date: Thu, 11 Feb 2021 10:47:42 +0300 Subject: [PATCH] Add abp tag helpers to edit organization and event page --- src/EventHub.Web/Pages/Events/Edit.cshtml | 67 +++++++++---------- src/EventHub.Web/Pages/Events/Edit.cshtml.cs | 2 +- src/EventHub.Web/Pages/Events/Edit.js | 9 +++ .../Pages/Organizations/Edit.cshtml | 47 +++++-------- .../Pages/Organizations/Edit.cshtml.cs | 1 + src/EventHub.Web/Pages/Organizations/Edit.js | 4 ++ 6 files changed, 66 insertions(+), 64 deletions(-) diff --git a/src/EventHub.Web/Pages/Events/Edit.cshtml b/src/EventHub.Web/Pages/Events/Edit.cshtml index c34bb77..b706e87 100644 --- a/src/EventHub.Web/Pages/Events/Edit.cshtml +++ b/src/EventHub.Web/Pages/Events/Edit.cshtml @@ -12,22 +12,10 @@

Edit Event

- - -
-
-
- + + + + @@ -46,9 +34,9 @@ -
-
- - - - - event-cover-image-preview - - - -
+ + + + + + If you change the event times, an informational email will be sent to all attendees. + + + + + + + + + + + event-cover-image-preview + + +
\ No newline at end of file diff --git a/src/EventHub.Web/Pages/Events/Edit.cshtml.cs b/src/EventHub.Web/Pages/Events/Edit.cshtml.cs index ee1b9ad..0446285 100644 --- a/src/EventHub.Web/Pages/Events/Edit.cshtml.cs +++ b/src/EventHub.Web/Pages/Events/Edit.cshtml.cs @@ -168,7 +168,7 @@ namespace EventHub.Web.Pages.Events [Required] [DataType(DataType.Upload)] - [MaxFileSize(EventConsts.MaxCoverImageFileSize)] + // [MaxFileSize(EventConsts.MaxCoverImageFileSize)] [AllowedExtensions(new string[] { ".jpg", ".png", ".jpeg" })] public IFormFile CoverImageFile { get; set; } } diff --git a/src/EventHub.Web/Pages/Events/Edit.js b/src/EventHub.Web/Pages/Events/Edit.js index b57517a..b57c847 100644 --- a/src/EventHub.Web/Pages/Events/Edit.js +++ b/src/EventHub.Web/Pages/Events/Edit.js @@ -19,6 +19,15 @@ $(function () { } }); + $("#btn-event-timing").click(function () { + $("#event-timing-preview-modal").modal("show"); + }); + + $("#event-timing-confirm").click(function () { + $("#Event_Timing_Form").submit(); + $("#event-timing-preview-modal").modal("hide"); + }) + $("#Event_Timing_Form").submit(function (e) { e.preventDefault(); diff --git a/src/EventHub.Web/Pages/Organizations/Edit.cshtml b/src/EventHub.Web/Pages/Organizations/Edit.cshtml index 08e7943..3de96e1 100644 --- a/src/EventHub.Web/Pages/Organizations/Edit.cshtml +++ b/src/EventHub.Web/Pages/Organizations/Edit.cshtml @@ -2,6 +2,7 @@ @inject IHtmlLocalizer L @using EventHub.Localization @using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal @model EventHub.Web.Pages.Organizations.EditPageModel @section scripts { @@ -11,28 +12,20 @@

@L["EditOrganization"]

- -
-
- -
-
+ + + + +
- +
- + @L["OrganizationProfilePictureInfo"]
@@ -43,18 +36,14 @@ @L["Submit"] - -
-
+ + + + + + + + + +
\ No newline at end of file diff --git a/src/EventHub.Web/Pages/Organizations/Edit.cshtml.cs b/src/EventHub.Web/Pages/Organizations/Edit.cshtml.cs index 7377b0d..fb7d634 100644 --- a/src/EventHub.Web/Pages/Organizations/Edit.cshtml.cs +++ b/src/EventHub.Web/Pages/Organizations/Edit.cshtml.cs @@ -86,6 +86,7 @@ namespace EventHub.Web.Pages.Organizations [Required] public Guid OrganizationId { get; set; } + [Required] [DataType(DataType.Upload)] [MaxFileSize(OrganizationConsts.MaxProfilePictureFileSize)] [AllowedExtensions(new string[] { ".jpg", ".png", ".jpeg" })] diff --git a/src/EventHub.Web/Pages/Organizations/Edit.js b/src/EventHub.Web/Pages/Organizations/Edit.js index 4f9cacf..abbfe4b 100644 --- a/src/EventHub.Web/Pages/Organizations/Edit.js +++ b/src/EventHub.Web/Pages/Organizations/Edit.js @@ -76,6 +76,10 @@ $(function () { var organizationId = document.getElementById("organization-id").value; var organizationName = document.getElementById("organization-name").value; + if(!$(this).valid()) { + return false; + } + if(file === undefined) { file = null; }