fixed Instant publish button showing up on non-draft articles

This commit is contained in:
Mia Rose Winter 2024-02-27 14:37:32 +01:00
parent 96783c771b
commit 3e8df14f5c
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -60,7 +60,7 @@
<button type="submit" class="btn btn-primary w-full sm:btn-wide">@Localizer["Review_Submit"]</button>
</form>
}
@if (Article.Status is ArticleStatus.InReview || context.User.IsInRole("Admin")) {
@if (Article.Status is ArticleStatus.InReview || (Article.Status is ArticleStatus.Draft && context.User.IsInRole("Admin"))) {
<form @formname="submit-for-publish" method="post" @onsubmit="SubmitForPublish" class="max-sm:w-full">
<AntiforgeryToken />
<button type="submit" class="btn btn-primary w-full sm:btn-wide">@Localizer["Publish_Submit"]</button>