aboutsummaryrefslogtreecommitdiff
path: root/abrechenbarkeit.lua
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-11-06 18:31:21 +0100
committermetamuffin <metamuffin@disroot.org>2024-11-06 18:31:21 +0100
commit51bc73ae4dbc1710b0011fcb2e2d1da7c0c4dac8 (patch)
tree1fb40ed51c0d258fa102763f9bf807bdb40aa7a9 /abrechenbarkeit.lua
parent2fe75952b88c64c89ee8487b33b497a3447f4880 (diff)
downloadabrechenbarkeit-51bc73ae4dbc1710b0011fcb2e2d1da7c0c4dac8.tar
abrechenbarkeit-51bc73ae4dbc1710b0011fcb2e2d1da7c0c4dac8.tar.bz2
abrechenbarkeit-51bc73ae4dbc1710b0011fcb2e2d1da7c0c4dac8.tar.zst
reuse field translations
Diffstat (limited to 'abrechenbarkeit.lua')
-rwxr-xr-xabrechenbarkeit.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua
index 5de3456..7ff0aaf 100755
--- a/abrechenbarkeit.lua
+++ b/abrechenbarkeit.lua
@@ -614,33 +614,33 @@ local function r_products()
<div class="container">
<form action="/?products" method="POST" class="box backgroundbox">
<h3>{+products.form.add}</h3>
- <label for="name">{+products.form.name}: </label>
+ <label for="name">{+field.name}: </label>
<input type="text" name="name" id="name" />
- <label for="price">{+products.form.price}: </label>
+ <label for="price">{+field.price}: </label>
<input type="number" name="price" id="price" />
- <label for="user">{+products.form.user}: </label>
+ <label for="user">{+field.user}: </label>
<input type="text" name="user" id="user" />
- <label for="barcode">{+products.form.barcode}: </label>
+ <label for="barcode">{+field.barcode}: </label>
<input type="text" name="barcode" id="barcode" />
- <input type="submit" value="{+products.form.add.short}" class="amount-ntr button" />
+ <input type="submit" value="{+field.add.short}" class="amount-ntr button" />
</form>
<form action="/?products" method="POST" class="box backgroundbox">
<h3>{+products.form.remove}</h3>
<input type="text" name="delete" value="1" hidden />
- <label for="barcode">{+products.form.barcode}: </label>
+ <label for="barcode">{+field.barcode}: </label>
<input type="text" name="barcode" id="barcode" />
- <input type="submit" value="{+products.form.remove.short}" class="amount-ntr button" />
+ <input type="submit" value="{+field.remove.short}" class="amount-ntr button" />
</form>
</div>
]], {
currency = config.unit or "€",
}))
print(format([[<table class="productlist"><tr>
- <th>{+products.list.name}</th>
- <th>{+products.list.price}</th>
- <th>{+products.list.barcode}</th>
- <th>{+products.list.count}</th>
- <th>{+products.list.user}</th>
+ <th>{+field.name}</th>
+ <th>{+field.price}</th>
+ <th>{+field.barcode}</th>
+ <th>{+field.count}</th>
+ <th>{+field.user}</th>
</tr>]]))
local pbals = product_balances()
for barcode, price, user, name in read_products() do