Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dependabot/nuget/src/O…
Browse files Browse the repository at this point in the history
…rchard.Web/Npgsql-8.0.3
  • Loading branch information
BenedekFarkas committed May 21, 2024
2 parents f301568 + 6e4fefd commit ba38f28
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ private ActionResult CreatePOST(int id, int contentId, string returnUrl, Action<

contentItem.As<ICommonPart>().Container = customForm.ContentItem;

// save the submitted form
if (customForm.SaveContentItem) {
conditionallyPublish(contentItem);
// Refresh content item
contentItem = _contentManager.Get(contentItem.Id, VersionOptions.Latest);
}

// triggers any event
_rulesManager.TriggerEvent("CustomForm", "Submitted",
() => new Dictionary<string, object> { { "Content", contentItem } });
Expand All @@ -210,11 +217,6 @@ private ActionResult CreatePOST(int id, int contentId, string returnUrl, Action<
returnUrl = _tokenizer.Replace(customForm.RedirectUrl, new Dictionary<string, object> { { "Content", contentItem } });
}

// save the submitted form
if (customForm.SaveContentItem) {
conditionallyPublish(contentItem);
}

// writes a confirmation message
if (customForm.CustomMessage) {
if (!String.IsNullOrWhiteSpace(customForm.Message)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Routing;
using Orchard.ContentManagement.MetaData;
using Orchard.Environment.Extensions;
using Orchard.Localization.Services;
Expand All @@ -25,10 +25,9 @@ public AdminLocalizedTaxonomyController(IContentDefinitionManager contentDefinit
}

[OutputCache(NoStore = true, Duration = 0)]
public new ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
public override ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
AdminFilter.Apply(_requestContext);

return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
return base.GetTaxonomy(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public LocalizedTaxonomyController(
}

[OutputCache(NoStore = true, Duration = 0)]
public ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
public virtual ActionResult GetTaxonomy(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
return GetTaxonomyInternal(contentTypeName, taxonomyFieldName, contentId, culture, selectedValues);
}

protected ActionResult GetTaxonomyInternal (string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
protected ActionResult GetTaxonomyInternal(string contentTypeName, string taxonomyFieldName, int contentId, string culture, string selectedValues) {
var viewModel = new TaxonomyFieldViewModel();
bool autocomplete = false;
var contentDefinition = _contentDefinitionManager.GetTypeDefinition(contentTypeName);
Expand Down

0 comments on commit ba38f28

Please sign in to comment.