mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 20:16:15 +08:00
Fixing that Content.SaveButton should be "Save" instead of "Save Draft" if the type is not Draftable
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Orchard.Core.Contents.Drivers {
|
||||
if (part.Id > 0) {
|
||||
results.Add(ContentShape("Content_DeleteButton", deleteButton => deleteButton));
|
||||
}
|
||||
|
||||
|
||||
results.Add(ContentShape("Content_CancelButton", cancelButton => cancelButton));
|
||||
|
||||
return Combined(results.ToArray());
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
<fieldset class="save-button">
|
||||
<button class="primaryAction" type="submit" name="submit.Save" value="submit.Save">@T("Save Draft")</button>
|
||||
</fieldset>
|
||||
@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