From e063a30a06caef9e4cda7afb5ef175b1c04b5e96 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 20 Oct 2024 20:28:09 +0100 Subject: Can now delete item from basket - if is only one item left, it is deleted along with the basket - if there are more than one, just that one is deleted - TODO needs proper handling of the confirmation page - it's not formatted. htmx? --- alphabetlearning/templates/payments/cart_lineitem.html | 2 +- alphabetlearning/templates/payments/cartitem_confirm_delete.html | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 alphabetlearning/templates/payments/cartitem_confirm_delete.html (limited to 'alphabetlearning/templates/payments') diff --git a/alphabetlearning/templates/payments/cart_lineitem.html b/alphabetlearning/templates/payments/cart_lineitem.html index 79899df..9524d96 100644 --- a/alphabetlearning/templates/payments/cart_lineitem.html +++ b/alphabetlearning/templates/payments/cart_lineitem.html @@ -12,7 +12,7 @@

{{ item.resource.card_description }}

-

Remove from basket

+

Remove from basket

diff --git a/alphabetlearning/templates/payments/cartitem_confirm_delete.html b/alphabetlearning/templates/payments/cartitem_confirm_delete.html new file mode 100644 index 0000000..da3b81e --- /dev/null +++ b/alphabetlearning/templates/payments/cartitem_confirm_delete.html @@ -0,0 +1,7 @@ + +
+ {% csrf_token %} +

Are you sure you want to delete "{{ object }}"?

+ {{ form }} + +
-- cgit v1.2.3