Update New/Edit Transaction Item pages to match modals

This commit is contained in:
James Chapman 2023-07-24 12:04:26 +01:00
parent d6407d18cb
commit c0c1743d78
Signed by: jamsch0
GPG Key ID: 765FE58130277547
2 changed files with 14 additions and 8 deletions

View File

@ -14,13 +14,19 @@
<h1>Edit Transaction Item</h1>
<div>@Model.Transaction.CreatedAt.ToShortDateString() @Model.Transaction.CreatedAt.ToShortTimeString() &ndash; @store</div>
<div class="form-field">
@Model.Transaction.CreatedAt.ToShortDateString() @Model.Transaction.CreatedAt.ToShortTimeString() &ndash; @store
</div>
<form method="post" asp-action="EditTransactionItem">
<form id="editTransactionItem" method="post" asp-action="EditTransactionItem">
<partial name="_TransactionItemForm" model="Model.TransactionItem" />
<div class="row">
<button class="button button--primary" type="submit">Update</button>
<a class="button" asp-action="EditTransactionItems">Cancel</a>
</div>
</form>
<form id="deleteTransactionItem" method="post" asp-action="DeleteTransactionItem" asp-route-id="@Model.TransactionItem.ItemId"></form>
<div class="row">
<button class="button button--primary" type="submit" form="editTransactionItem">Update</button>
<a class="button" asp-action="NewTransactionItems">Cancel</a>
<span class="row__fill"></span>
<button class="button button--danger" type="submit" form="deleteTransactionItem">Remove</button>
</div>

View File

@ -14,7 +14,7 @@
<h1>New Transaction Item</h1>
<div>@Model.CreatedAt.ToShortDateString() @Model.CreatedAt.ToShortTimeString() &ndash; @store</div>
<div class="form-field">@Model.CreatedAt.ToShortDateString() @Model.CreatedAt.ToShortTimeString() &ndash; @store</div>
<form method="post" asp-action="NewTransactionItem">
<partial name="_TransactionItemForm" model="null" />