From 1d445c54380c006963954855d37efc70d05152ac Mon Sep 17 00:00:00 2001 From: Lombiq Date: Mon, 15 Jun 2015 00:07:01 +0200 Subject: [PATCH] Fixing that Custom Forms didn't display a submit button text if there was none configured The button text not being configured can happen on an 1.8 to 1.9 upgrade for example. --- .../Modules/Orchard.CustomForms/Views/Item/Create.cshtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml b/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml index e4a36fadb..28953d799 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml @@ -8,6 +8,8 @@ // remove default Save/Publish buttons Model.Zones["Sidebar"].Items.Clear(); + + var submitButtonText = String.IsNullOrEmpty(Model.ContentItem.CustomFormPart.SubmitButtonText) ? T("Submit").Text : Model.ContentItem.CustomFormPart.SubmitButtonText; } @Display(New.Parts_Title().Title(Html.ItemDisplayText(customForm))) @@ -18,7 +20,7 @@ @Display(Model)
- +
}