From dbc12873214322616cc2592658fa3bfc0c480b48 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Thu, 4 Apr 2024 18:48:22 +1100 Subject: [PATCH] Convert transaction editing form to Tailwind CSS --- .../journal/journal_edit_transaction.html | 196 ++++++++++++------ 1 file changed, 132 insertions(+), 64 deletions(-) diff --git a/drcr/templates/journal/journal_edit_transaction.html b/drcr/templates/journal/journal_edit_transaction.html index 60025c0..40dc179 100644 --- a/drcr/templates/journal/journal_edit_transaction.html +++ b/drcr/templates/journal/journal_edit_transaction.html @@ -1,5 +1,5 @@ {# DrCr: Web-based double-entry bookkeeping framework - Copyright (C) 2022–2023 Lee Yingtong Li (RunasSudo) + Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -15,26 +15,32 @@ along with this program. If not, see . #} -{% extends 'base.html' %} +{% extends 'base_tailwind.html' %} {% block title %}{{ 'Edit' if transaction and transaction.id else 'New' }} transaction{% endblock %} {% block content %} -

{{ 'Edit' if transaction and transaction.id else 'New' }} transaction

+

+ {{ 'Edit' if transaction and transaction.id else 'New' }} transaction +

- +
- - - - - + + + + + - - + + @@ -42,31 +48,43 @@ {% for posting in transaction.postings %} - - #} + {% if posting.quantity >= 0 %} - - + {% else %} - - + {% endif %} @@ -75,43 +93,63 @@ {% else %} - - #} + - - + - - #} + - - + @@ -119,11 +157,11 @@
DateDescriptionDrCr
DateDescriptionDrCr
+ + + +
-
- - - + {#
+
+
+
+ +
+ +
+ + + + +
-
-
$
- +
+
+
+ $ +
+
-
-
$
- +
+
+
+ $ +
+
-
- - - + {#
+
+
+
+ +
+ +
+ + + + +
-
-
$
- +
+
+
+ $ +
+
-
- - - + {#
+
+
+
+ +
+ +
+ + + + +
-
-
$
- +
+
+
+ $ +
+
-
+
{% if transaction and transaction.id %} - + {% endif %} - +
@@ -131,9 +169,10 @@ {% endblock %} {% block scripts %} + {# TODO: This would be much easier with React or similar... #}