save
This commit is contained in:
parent
35971fd696
commit
1ed14b5549
7 changed files with 118 additions and 162 deletions
|
@ -1,67 +1,32 @@
|
|||
<section class="flex flex-col gap-4">
|
||||
{% include 'lib/alert.twig' %}
|
||||
<form action="/admin/transactions/add" method="post" class="flex flex-col gap-4">
|
||||
{% if session.last_post.confirm %}
|
||||
Confirm
|
||||
<input type="hidden" name="confirm" id="confirm" value="{{ session.last_post.confirm }}">
|
||||
{% endif %}
|
||||
{% if session.last_post.amount is defined %}
|
||||
{{ session.last_post.amount }}
|
||||
{{ session.last_post.currency }}
|
||||
<input
|
||||
type="hidden" name="amount" id="amount" value="{{ session.last_post.amount }}" />
|
||||
{% else %}
|
||||
{% include 'lib/inputs/number.twig' with {
|
||||
id: 'amount',
|
||||
name: 'amount',
|
||||
label: 'Amount',
|
||||
placeholder: 'Enter the amount',
|
||||
value: session.last_post.amount,
|
||||
required: true
|
||||
} %}
|
||||
{% endif %}
|
||||
{% if session.last_post.currency %}
|
||||
<input
|
||||
type="hidden" name="currency" id="currency" value="{{ session.last_post.currency }}" />
|
||||
{% else %}
|
||||
{% include 'lib/inputs/select.twig' with {
|
||||
id: 'currency',
|
||||
name: 'currency',
|
||||
label: 'Currency',
|
||||
value: session.last_post.currency,
|
||||
options: [
|
||||
{ 'value': 'sats', 'text': 'Sats' },
|
||||
{ 'value': 'cents', 'text': 'Cents' }
|
||||
],
|
||||
required: true
|
||||
} %}
|
||||
{% endif %}
|
||||
{% if session.last_post.user_identifier is defined %}
|
||||
{% if session.last_post.email is defined %}
|
||||
{{ session.last_post.id }}
|
||||
{{ session.last_post.email }}
|
||||
{% endif %}
|
||||
<input
|
||||
type="hidden" name="user_identifier" id="user_identifier" value="{{ session.last_post.user_identifier }}" />
|
||||
{% else %}
|
||||
{% include 'lib/inputs/text.twig' with {
|
||||
type: 'text',
|
||||
name: 'user_identifier',
|
||||
label: 'User Identifier',
|
||||
placeholder: 'Enter email or user index',
|
||||
value: session.last_post.user_identifier
|
||||
} %}
|
||||
{% endif %}
|
||||
{% include 'lib/buttons/submit.twig' with {
|
||||
label: 'Submit',
|
||||
} %}
|
||||
</form>
|
||||
{% if session.last_post %}
|
||||
<a href="/admin/transactions/reset">
|
||||
{% include 'lib/buttons/default.twig' with {
|
||||
label: 'Cancel'
|
||||
} %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
{% include 'lib/inputs/number.twig' with {
|
||||
id: 'amount',
|
||||
name: 'amount',
|
||||
label: 'Amount',
|
||||
placeholder: 'Enter the amount',
|
||||
required: true
|
||||
} %}
|
||||
{% include 'lib/inputs/select.twig' with {
|
||||
id: 'currency',
|
||||
name: 'currency',
|
||||
label: 'Currency',
|
||||
options: [
|
||||
{ 'value': 'sats', 'text': 'Sats' },
|
||||
{ 'value': 'cents', 'text': 'Cents' }
|
||||
],
|
||||
required: true
|
||||
} %}
|
||||
{% include 'lib/inputs/text.twig' with {
|
||||
type: 'text',
|
||||
name: 'user_identifier',
|
||||
label: 'User Identifier',
|
||||
placeholder: 'Enter email or user index',
|
||||
} %}
|
||||
{% include 'lib/buttons/submit.twig' with {
|
||||
label: 'Submit',
|
||||
} %}
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
|
|
@ -1,27 +1,10 @@
|
|||
<section class="flex flex-col gap-4">
|
||||
{% include 'lib/alert.twig' %}
|
||||
<form action="/admin/transactions/add" method="post" class="flex flex-col gap-4">
|
||||
{% include 'lib/inputs/number.twig' with {
|
||||
id: 'amount',
|
||||
name: 'amount',
|
||||
label: 'Amount',
|
||||
required: true
|
||||
} %}
|
||||
{% include 'lib/inputs/select.twig' with {
|
||||
id: 'currency',
|
||||
name: 'currency',
|
||||
label: 'Currency',
|
||||
options: [
|
||||
{ value: 'cents', text: 'Cents' },
|
||||
{ value: 'sats', text: 'Sats' }
|
||||
],
|
||||
required: true
|
||||
} %}
|
||||
<a href="/admin/transactions/add">
|
||||
{% include 'lib/buttons/submit.twig' with {
|
||||
label: 'Submit',
|
||||
label: 'Create a New Transaction',
|
||||
} %}
|
||||
</form>
|
||||
|
||||
</a>
|
||||
<h3 class="text-2xl font-semibold">
|
||||
Liabilities
|
||||
</h3>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue