mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 04:19:04 +08:00
Fixing that Content.SaveButton should be "Save" instead of "Save Draft" if the type is not Draftable
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
<fieldset class="save-button">
|
||||
<button class="primaryAction" type="submit" name="submit.Save" value="submit.Save">@T("Save Draft")</button>
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Core.Contents.Settings
|
||||
|
||||
@{
|
||||
var contentItem = Model.ContentItem as ContentItem;
|
||||
var label = contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable
|
||||
? T("Save Draft")
|
||||
: T("Save");
|
||||
}
|
||||
|
||||
<fieldset class="save-button">
|
||||
<button class="primaryAction" type="submit" name="submit.Save" value="submit.Save">@label</button>
|
||||
</fieldset>
|
||||
Reference in New Issue
Block a user