Update button rendering, move css classes to viewdata
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
@using LeafWeb.WebCms.Controllers
|
||||
@model Tuple<int, string, bool>
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model Tuple<int, string>
|
||||
@{
|
||||
var leafInputId = Model.Item1;
|
||||
var identifier = Model.Item2;
|
||||
// true for a link, false for a button
|
||||
var buttonType = Model.Item3 ? "btn-link" : "btn-outline-secondary";
|
||||
}
|
||||
@using (Html.BeginUmbracoForm<QueueController>("Cancel", null,
|
||||
new { @class = "confirm clearfix", confirm_msg = "Cancelling cannot be undone! Confirm cancelling '" + identifier + "'." }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@leafInputId"/>
|
||||
<button type="submit" class="btn @buttonType">
|
||||
<button type="submit" @Html.Partial("DisplayTemplates/_ViewDataCssClass") @if(ViewData.IsButtonDisabled()) {<text>disabled</text>}>
|
||||
<span class="fa fa-ban"></span> Cancel
|
||||
</button>
|
||||
}
|
||||
Reference in New Issue
Block a user