Skip to content

Commit

Permalink
Use env-values in template
Browse files Browse the repository at this point in the history
  • Loading branch information
Jona Zantz committed Jan 10, 2025
1 parent bbd739e commit 6ba5c3e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vinywaji/gui/templates/components/forms/pay-up.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
action="{% url 'transaction-list' %}?currency=euro&type=deposit" method="post">
{% csrf_token %}
<div class="grid grid-cols-1 sm:grid-cols-3 justify-stretch gap-2">
{% usemacro input "Deposit Value (€)" "amount" id="amount_deposit" type="number" required=True step="0.1" min="0.1" class="sm:col-span-2" %}
{% usemacro input "Deposit Value (€)" "amount" id="amount_deposit" type="number" value=pay_up_amount required=True step="0.1" min="0.1" class="sm:col-span-2" %}

{% usemacro button "Deposit" icon="deposit" color="lime" darkColor="green" %}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
action="{% url 'transaction-list' %}?currency=euro&type=purchase" method="post">
{% csrf_token %}
<div class="grid grid-cols-2 sm:grid-cols-3 justify-stretch gap-2">
{% usemacro input "Purchase Value (€)" "amount" id="amount_purchase" value="1.5" type="number" required=True step="0.1" %}
{% usemacro input "Purchase Value (€)" "amount" id="amount_purchase" value=default_amount type="number" required=True step="0.1" %}

{% usemacro input "Description" "description" type="text" placeholder="fritz-kola" %}

Expand Down
4 changes: 2 additions & 2 deletions src/vinywaji/gui/templates/views/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ <h4 class="text-4xl leading-normal">

<hr class="py-2">

{% include "components/forms/record-purchase.html" %}
{% include "components/forms/record-purchase.html" with default_amount=default_amount %}

{% include "components/forms/pay-up.html" %}
{% include "components/forms/pay-up.html" with pay_up_amount=pay_up_amount %}

<h4 class="text-4xl leading-normal">Past transactions</h4>
<hr class="py-2">
Expand Down

0 comments on commit 6ba5c3e

Please sign in to comment.