Skip to content

Commit

Permalink
Fix Publish Later Buttons (#14438)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Oct 5, 2023
1 parent 17b3b55 commit dc4a4d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
Expand Down Expand Up @@ -73,7 +72,7 @@ private async ValueTask PopulateViewModel(PublishLaterPart part, PublishLaterPar
viewModel.ScheduledPublishUtc = part.ScheduledPublishUtc;
viewModel.ScheduledPublishLocalDateTime = part.ScheduledPublishUtc.HasValue ?
(await _localClock.ConvertToLocalAsync(part.ScheduledPublishUtc.Value)).DateTime :
(DateTime?)null;
null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.PublishContent, Model.ContentItem))
{
<div class="btn-group">
<input asp-for="ScheduledPublishLocalDateTime" type="datetime-local" class="form-control content-preview-select" />
<button class="btn btn-primary btn-publish-later" type="submit" name="submit.Save" value="submit.PublishLater">@T["Publish Later"]</button>
<div class="input-group">
<input asp-for="ScheduledPublishLocalDateTime" type="datetime-local" class="form-control content-preview-select" />
<button class="btn btn-outline-success btn-publish-later" type="submit" name="submit.Save" value="submit.PublishLater">@T["Publish Later"]</button>
</div>
</div>
@if (Model.ScheduledPublishUtc.HasValue)
{
<div class="btn-group">
<button class="btn btn-primary btn-publish-later" type="submit" name="submit.Save" value="submit.CancelPublishLater">@T["Cancel Publish Later"]</button>
<button class="btn btn-warning btn-publish-later" type="submit" name="submit.Save" value="submit.CancelPublishLater">@T["Cancel Publish Later"]</button>
</div>
}
}

0 comments on commit dc4a4d2

Please sign in to comment.