Re-allow typing commodities into transaction editor

Unfortunately this removes the spinner buttons from the amount field, but this is an insignificant consequence

Closes #5
This commit is contained in:
RunasSudo 2024-11-09 15:59:36 +11:00
parent 3542d80483
commit 7416d270de
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -49,7 +49,7 @@
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<span class="text-gray-500">$</span>
</div>
<input type="number" class="bordered-field pl-7" name="amount" step="0.01" oninput="changeAmount(this)">
<input type="text" class="bordered-field pl-7" name="amount" oninput="changeAmount(this)">
</div>
</td>
<td class="amount-cr py-1 pl-1"></td>
@ -86,7 +86,7 @@
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<span class="text-gray-500">$</span>
</div>
<input type="number" class="bordered-field pl-7" name="amount" step="0.01" oninput="changeAmount(this)">
<input type="text" class="bordered-field pl-7" name="amount" oninput="changeAmount(this)">
</div>
</td>
</tr>
@ -150,7 +150,7 @@
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<span class="text-gray-500">$</span>
</div>
<input type="number" class="bordered-field pl-7" name="amount" step="0.01" value="{{ posting.amount().quantity_string() }}" oninput="changeAmount(this)">
<input type="text" class="bordered-field pl-7" name="amount" value="{{ posting.amount().quantity_string() }}" oninput="changeAmount(this)">
</div>
</td>
<td class="amount-cr py-1 pl-1"></td>
@ -161,7 +161,7 @@
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<span class="text-gray-500">$</span>
</div>
<input type="number" class="bordered-field pl-7" name="amount" step="0.01" value="{{ (posting.amount()|abs).quantity_string() }}" oninput="changeAmount(this)">
<input type="text" class="bordered-field pl-7" name="amount" value="{{ (posting.amount()|abs).quantity_string() }}" oninput="changeAmount(this)">
</div>
</td>
{% endif %}