mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
<fieldset class="submit-button">
|
||||
<button type="submit" name="submit.Save" value="submit.Save">@Model.ContentItem.CustomFormPart.SubmitButtonText</button>
|
||||
<button type="submit" name="submit.Save" value="submit.Save">@submitButtonText</button>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user