From 2b221353de954b91a5a141af21b1816909fa7bc5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 18 Apr 2024 16:41:35 +0200 Subject: [PATCH] attendent list in transaction assignment --- ledgers/index.cgi | 8 +++++++- style.css | 20 +++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ledgers/index.cgi b/ledgers/index.cgi index 621ef82..7cd3464 100755 --- a/ledgers/index.cgi +++ b/ledgers/index.cgi @@ -29,7 +29,7 @@ credit() { done printf ' ]' printf ' - [form .ledgers action="%s/ledgers/delete.sh" method=POST + [form .ibanassign action="%s/ledgers/iban_assign.sh" method=POST [input type=hidden name=session_id value="%s"] [h3 . %s] ' "${_BASE}" "$SESSION_ID" "$(l10n "IBAN Assignments")" @@ -43,11 +43,17 @@ credit() { : elif [ $state = guess ]; then record="$(UNSTRING "${data%% *}")" + cards="${data#* }" principal="${record#* * * }" principal="${principal%% *}" subject="${record#* * * * }" subject="${subject%% *}" amount="${record#* * * * * }" amount="${amount%% *}" printf '[p .principal . %s][p .amount %s][p .subject . %s]' \ "$(UNSTRING "$principal" |HTML)" "$(credit "$amount")" "$(UNSTRING "$subject" |HTML)" + printf '[h4 . %s]' "$(l10n Guesses)" + for card in $cards; do + uid="${card%%/*}" name="$(UNSTRING "${card#*/}")" + printf '[input .card key="cardfn" value="%s" placeholder="%s"]' "$(HTML "${name}")" "$(l10n attendent)" + done elif [ $state = unknown ]; then principal="${data#* * * }" principal="${principal%% *}" subject="${data#* * * * }" subject="${subject%% *}" diff --git a/style.css b/style.css index b56956f..98b839d 100644 --- a/style.css +++ b/style.css @@ -368,30 +368,32 @@ body.categories form.namelist ul.namelist > li ul li { display: inline-block; } +form.ibanassign, form.ledgers { padding: .125em 1em 0 1em; } -.ledgers fieldset.iban.sure { background-color: #DFD; } -.ledgers fieldset.iban.guess { background-color: #FFD; } -.ledgers fieldset.iban.unknown { background-color: #FDD; } +.ibanassign fieldset.iban.sure { background-color: #DFD; } +.ibanassign fieldset.iban.guess { background-color: #FFD; } +.ibanassign fieldset.iban.unknown { background-color: #FDD; } -.ledgers fieldset.iban { +.ibanassign fieldset.iban { padding: 0 .75em; margin-top: -.5em; box-shadow: .25em .25em .25em #AAA; } -.ledgers fieldset.iban legend { +.ibanassign fieldset.iban legend { top: .75em; } -.ledgers fieldset.iban p.principal { +.ibanassign fieldset.iban p.principal { font-size: .875em; } -.ledgers fieldset.iban p.amount, -.ledgers fieldset.iban p.subject { +.ibanassign fieldset.iban p.amount, +.ibanassign fieldset.iban p.subject { display: inline-block; vertical-align: top; } -.ledgers fieldset.iban p.amount { +.ibanassign fieldset.iban p.amount { font-weight: bold; + margin-right: .75em; } -- 2.39.2